Rename __pthread_spin_unlock back to __pthread_unlock.
authordrepper <drepper>
Thu, 25 May 2000 05:26:59 +0000 (05:26 +0000)
committerdrepper <drepper>
Thu, 25 May 2000 05:26:59 +0000 (05:26 +0000)
Use struct _pthread_fastlock instead of pthread_spinlock_t.
Remove pthread_spin_lock functions.

linuxthreads/spinlock.c

index c482d91..50edfa3 100644 (file)
@@ -36,7 +36,7 @@
    This is safe because there are no concurrent __pthread_unlock
    operations -- only the thread that locked the mutex can unlock it. */
 
    This is safe because there are no concurrent __pthread_unlock
    operations -- only the thread that locked the mutex can unlock it. */
 
-void internal_function __pthread_lock(pthread_spinlock_t * lock,
+void internal_function __pthread_lock(struct _pthread_fastlock * lock,
                                      pthread_descr self)
 {
   long oldstatus, newstatus;
                                      pthread_descr self)
 {
   long oldstatus, newstatus;
@@ -83,14 +83,8 @@ void internal_function __pthread_lock(pthread_spinlock_t * lock,
   while (spurious_wakeup_count--)
     restart(self);
 }
   while (spurious_wakeup_count--)
     restart(self);
 }
-int __pthread_spin_lock(pthread_spinlock_t * lock)
-{
-  __pthread_lock (lock, NULL);
-  return 0;
-}
-weak_alias (__pthread_spin_lock, pthread_spin_lock)
 
 
-int __pthread_spin_unlock(pthread_spinlock_t * lock)
+int __pthread_unlock(struct _pthread_fastlock * lock)
 {
   long oldstatus;
   pthread_descr thr, * ptr, * maxptr;
 {
   long oldstatus;
   pthread_descr thr, * ptr, * maxptr;
@@ -151,31 +145,7 @@ again:
 
   return 0;
 }
 
   return 0;
 }
-weak_alias (__pthread_spin_unlock, pthread_spin_unlock)
-
-
-int __pthread_spin_trylock (pthread_spinlock_t *lock)
-{
-  return __pthread_trylock (lock);
-}
-weak_alias (__pthread_spin_trylock, pthread_spin_trylock)
 
 
-int __pthread_spin_init(pthread_spinlock_t *lock, int pshared)
-{
-  if (pshared != 0)
-    return ENOSYS;
-
-  __pthread_init_lock (lock);
-  return 0;
-}
-weak_alias (__pthread_spin_init, pthread_spin_init)
-
-int __pthread_spin_destroy(pthread_spinlock_t *lock)
-{
-  /* Nothing to do.  */
-  return 0;
-}
-weak_alias (__pthread_spin_destroy, pthread_spin_destroy)
 
 /* Compare-and-swap emulation with a spinlock */
 
 
 /* Compare-and-swap emulation with a spinlock */