testandset on powerpc
Andreas Jaeger
aj@suse.de
Tue Jul 18 08:42:00 GMT 2000
>>>>> 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
More information about the Libc-hacker
mailing list