From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 6299 invoked by alias); 10 Apr 2003 16:36:00 -0000 Mailing-List: contact gdb-patches-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sources.redhat.com Received: (qmail 6257 invoked from network); 10 Apr 2003 16:35:58 -0000 Received: from unknown (HELO Cantor.suse.de) (213.95.15.193) by sources.redhat.com with SMTP; 10 Apr 2003 16:35:58 -0000 Received: from Hermes.suse.de (Hermes.suse.de [213.95.15.136]) by Cantor.suse.de (Postfix) with ESMTP id B74131473D; Thu, 10 Apr 2003 18:35:57 +0200 (MEST) To: Elena Zannoni Cc: Daniel Jacobowitz , Andrew Cagney , gdb-patches@sources.redhat.com Subject: Re: [RFA/TESTSUITE] build schedlock.c on 64-bit platforms X-Yow: Wait.. is this a FUN THING or the END of LIFE in Petticoat Junction?? From: Andreas Schwab Date: Thu, 10 Apr 2003 16:36:00 -0000 In-Reply-To: <16021.38758.253330.163921@localhost.redhat.com> (Elena Zannoni's message of "Thu, 10 Apr 2003 12:10:14 -0400") Message-ID: User-Agent: Gnus/5.090017 (Oort Gnus v0.17) Emacs/21.3.50 (gnu/linux) References: <16019.15635.929065.664152@localhost.redhat.com> <20030409131329.GA4525@nevyn.them.org> <16021.31692.763468.4182@localhost.redhat.com> <20030410141953.GA10379@nevyn.them.org> <3E958136.3060102@redhat.com> <20030410152038.GA11800@nevyn.them.org> <16021.38758.253330.163921@localhost.redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-SW-Source: 2003-04/txt/msg00204.txt.bz2 Elena Zannoni writes: |> Daniel Jacobowitz writes: |> > On Thu, Apr 10, 2003 at 05:16:05PM +0200, Andreas Schwab wrote: |> > > Andrew Cagney writes: |> > > |> > > |> > args[i] = 1; |> > > |> >> - res = pthread_create(&threads[i], NULL, thread_function, (void *)i); |> > > |> >> |> > > |> |> > > |> Try: |> > > |> |> > > |> (((char *) NULL) + i) |> > > |> |> > > |> and what ever the reverse of that is .... |> > > |> > > That is even less portable than the above. |> > |> > Really? What's non-portable about it? |> |> |> Attempt #3.... IMHO the intermediate cast to long (or better intptr_t when available) would be most portable. Andreas. -- Andreas Schwab, SuSE Labs, schwab@suse.de SuSE Linux AG, Deutschherrnstr. 15-19, D-90429 Nürnberg Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5 "And now for something completely different."