Re: Once again: test_and_set for CPUs w/o LL/SC

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Oct 17, 2002 at 02:02:35PM +0200, Maciej W. Rozycki wrote:
> On Thu, 17 Oct 2002, Gleb O. Raiko wrote:
> 
> > Implement new sysmips then.
> 
>  I'm not sure if that's a good idea.  Glibc alone uses test_and_set(),
> exchange_and_add(), atomic_add() and compare_and_swap().  Do you want a
> separate syscall for each of these functions?  I think the ll/sc emulation
> may be the best solution after all.  At least it's most flexible and not
> much slower if at all.

Depends on your usage pattern. E.g. we don't run software that uses
atomicity.h (i.e. no C++ code), but heavily use pthread_mutex_lock() etc.
The few uses of atomicity.h internal to glibc don't warrant
any optimizations. So, if the beql-Method would not exist, I would
consider implementing a new sysmips for compare_and_swap().


Regards,
Johannes


[Index of Archives]     [Linux MIPS Home]     [LKML Archive]     [Linux ARM Kernel]     [Linux ARM]     [Linux]     [Git]     [Yosemite News]     [Linux SCSI]     [Linux Hams]

  Powered by Linux