mirror of
https://sourceware.org/git/glibc.git
synced 2024-11-25 06:20:06 +00:00
2006-07-18 Carlos O'Donell <carlos@systemhalted.org>
* sysdeps/hppa/nptl/pthread_spin_lock.c (pthread_spin_lock): Swap newval and oldval. * sysdeps/hppa/nptl/pthread_spin_trylock.c (pthread_spin_trylock): Likewise.
This commit is contained in:
parent
f765aca3da
commit
6dc958e5dd
@ -1,3 +1,10 @@
|
||||
2006-07-18 Carlos O'Donell <carlos@systemhalted.org>
|
||||
|
||||
* sysdeps/hppa/nptl/pthread_spin_lock.c (pthread_spin_lock): Swap
|
||||
newval and oldval.
|
||||
* sysdeps/hppa/nptl/pthread_spin_trylock.c (pthread_spin_trylock):
|
||||
Likewise.
|
||||
|
||||
2006-07-16 Jeff Bailey <jbailey@ubuntu.com>
|
||||
|
||||
* sysdeps/hppa/tst-audit.h: New file.
|
||||
|
@ -31,7 +31,7 @@ pthread_spin_lock (pthread_spinlock_t *lock)
|
||||
return 0;
|
||||
#endif
|
||||
|
||||
while (atomic_compare_and_exchange_val_acq(lock, 0, 1) == 1)
|
||||
while (atomic_compare_and_exchange_val_acq(lock, 1, 0) == 1)
|
||||
while (*lock == 1);
|
||||
|
||||
return 0;
|
||||
|
@ -29,6 +29,6 @@ pthread_spin_trylock (pthread_spinlock_t *lock)
|
||||
return __ldcw (a) ? 0 : EBUSY;
|
||||
#endif
|
||||
|
||||
return atomic_compare_and_exchange_val_acq(lock, 0, 1) ? EBUSY : 0;
|
||||
return atomic_compare_and_exchange_val_acq(lock, 1, 0) ? EBUSY : 0;
|
||||
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user