This is the mail archive of the libc-hacker@sources.redhat.com mailing list for the glibc project.

Note that libc-hacker is a closed list. You may look at the archives of this list, but subscription and posting are not open.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: testandset on powerpc


>>>>> Geoff Keating writes:

>> Cc: geoffk@cygnus.com
>> From: Andreas Jaeger <aj@suse.de>
>> Date: 18 Jul 2000 15:02:32 +0200
>> User-Agent: Gnus/5.0807 (Gnus v5.8.7) XEmacs/21.1 (Bryce Canyon)
>> 
>> 
>> On PPC I get now when building nscd:
>> /usr/src/packages/BUILD/glibc-2.2/cc/linuxthreads/libpthread.so: undefined reference to `testandset'
>> collect2: ld returned 1 exit status
>> 
>> $ nm linuxthreads/libpthread.so |grep testandset
>> U testandset
>> 
>> Is this a problem of too old tools/gcc?  Or should the appended patch
>> (at least partially) be reverted?
>> 
>> 1998-08-22  Geoff Keating  <geoffk@ozemail.com.au>
>> 
>> * sysdeps/powerpc/pt-machine.h: Remove testandset, it's not used
>> and wastes space; correct types.

Geoff> It'd be better if the generic code could be written to simply use
Geoff> compare_and_swap if it is available.  That would make porting easier.

Why?  All platforms - except ppc - have testandset.  IMHO porting
would be easier if ppc had testandset ;-).

testandset is only used in spinlock.c.  Should we document somewhere
that and why testandset is deprecated?

Andreas
-- 
 Andreas Jaeger
  SuSE Labs aj@suse.de
   private aj@arthur.rhein-neckar.de

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]