mirror of
https://sourceware.org/git/glibc.git
synced 2025-08-05 19:35:52 +03:00
* sysdeps/powerpc/pspinlock.c (__pthread_spin_lock): Implement. (__pthread_spin_trylock): Implement. (__pthread_spin_unlock): Implement. (__pthread_spin_init): Implement. (__pthread_spin_destroy): Implement.
2000-06-11 Geoff Keating <geoffk@cygnus.com> * sysdeps/powerpc/pspinlock.c (__pthread_spin_lock): Implement. (__pthread_spin_trylock): Implement. (__pthread_spin_unlock): Implement. (__pthread_spin_init): Implement. (__pthread_spin_destroy): Implement. really append the entry.
This commit is contained in:
@@ -1,7 +1,15 @@
|
|||||||
|
2000-06-11 Geoff Keating <geoffk@cygnus.com>
|
||||||
|
|
||||||
|
* sysdeps/powerpc/pspinlock.c (__pthread_spin_lock): Implement.
|
||||||
|
(__pthread_spin_trylock): Implement.
|
||||||
|
(__pthread_spin_unlock): Implement.
|
||||||
|
(__pthread_spin_init): Implement.
|
||||||
|
(__pthread_spin_destroy): Implement.
|
||||||
|
|
||||||
2000-06-10 Ulrich Drepper <drepper@redhat.com>
|
2000-06-10 Ulrich Drepper <drepper@redhat.com>
|
||||||
|
|
||||||
* sysdeps/pthread/timer_routines.c (list_append): Little fix to
|
* sysdeps/pthread/timer_routines.c (list_append): Little fix to
|
||||||
reall append the entry.
|
really append the entry.
|
||||||
|
|
||||||
2000-06-10 Andreas Jaeger <aj@suse.de>
|
2000-06-10 Andreas Jaeger <aj@suse.de>
|
||||||
|
|
||||||
|
@@ -19,12 +19,15 @@
|
|||||||
|
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
#include <pthread.h>
|
#include <pthread.h>
|
||||||
|
#include <pt-machine.h>
|
||||||
|
|
||||||
|
|
||||||
int
|
int
|
||||||
__pthread_spin_lock (pthread_spinlock_t *lock)
|
__pthread_spin_lock (pthread_spinlock_t *lock)
|
||||||
{
|
{
|
||||||
XXX
|
while (! __compare_and_swap ((long int *)lock, 0, 1))
|
||||||
|
;
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
weak_alias (__pthread_spin_lock, pthread_spin_lock)
|
weak_alias (__pthread_spin_lock, pthread_spin_lock)
|
||||||
|
|
||||||
@@ -32,7 +35,7 @@ weak_alias (__pthread_spin_lock, pthread_spin_lock)
|
|||||||
int
|
int
|
||||||
__pthread_spin_trylock (pthread_spinlock_t *lock)
|
__pthread_spin_trylock (pthread_spinlock_t *lock)
|
||||||
{
|
{
|
||||||
XXX
|
return __compare_and_swap ((long int *)lock, 0, 1) ? 0 : EBUSY;
|
||||||
}
|
}
|
||||||
weak_alias (__pthread_spin_trylock, pthread_spin_trylock)
|
weak_alias (__pthread_spin_trylock, pthread_spin_trylock)
|
||||||
|
|
||||||
@@ -40,7 +43,9 @@ weak_alias (__pthread_spin_trylock, pthread_spin_trylock)
|
|||||||
int
|
int
|
||||||
__pthread_spin_unlock (pthread_spinlock_t *lock)
|
__pthread_spin_unlock (pthread_spinlock_t *lock)
|
||||||
{
|
{
|
||||||
XXX
|
MEMORY_BARRIER ();
|
||||||
|
*lock = 0;
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
weak_alias (__pthread_spin_unlock, pthread_spin_unlock)
|
weak_alias (__pthread_spin_unlock, pthread_spin_unlock)
|
||||||
|
|
||||||
@@ -51,7 +56,7 @@ __pthread_spin_init (pthread_spinlock_t *lock, int pshared)
|
|||||||
/* We can ignore the `pshared' parameter. Since we are busy-waiting
|
/* We can ignore the `pshared' parameter. Since we are busy-waiting
|
||||||
all processes which can access the memory location `lock' points
|
all processes which can access the memory location `lock' points
|
||||||
to can use the spinlock. */
|
to can use the spinlock. */
|
||||||
XXX
|
*lock = 1;
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
weak_alias (__pthread_spin_init, pthread_spin_init)
|
weak_alias (__pthread_spin_init, pthread_spin_init)
|
||||||
|
Reference in New Issue
Block a user