diff options
author | Samuel Thibault <samuel.thibault@ens-lyon.org> | 2008-08-03 18:56:49 +0000 |
---|---|---|
committer | Samuel Thibault <samuel.thibault@ens-lyon.org> | 2008-08-03 18:56:49 +0000 |
commit | 334b9a33a8adcddaf144e8285367c6753b7ab7ec (patch) | |
tree | 7305a085a080bb96f06bfed3b4c69c72842d1f40 /sysdeps/mach/bits/spin-lock.h | |
parent | 3bcc540d4c6c59dbfa5958d1b59942f8b610bf5e (diff) |
* Makefile (sysdeps_headers): Add spin-lock-inline.h.
(SYSDEP_PATH): Move sysdeps/i386 right after
sysdeps/$(MICROKERNEL)/i386.
* include/pthread/pthread.h: Include <bits/spin-lock-inline.h>.
* sysdeps/i386/bits/spin-lock.h: Move inlines to...
* sysdeps/i386/bits/spin-lock-inline.h: ... new file.
* sysdeps/mach/bits/spin-lock.h: Move inlines to...
* sysdeps/mach/bits/spin-lock-inline.h: ... new file.
Diffstat (limited to 'sysdeps/mach/bits/spin-lock.h')
-rw-r--r-- | sysdeps/mach/bits/spin-lock.h | 59 |
1 files changed, 0 insertions, 59 deletions
diff --git a/sysdeps/mach/bits/spin-lock.h b/sysdeps/mach/bits/spin-lock.h index 0cbf11e..54425cc 100644 --- a/sysdeps/mach/bits/spin-lock.h +++ b/sysdeps/mach/bits/spin-lock.h @@ -33,65 +33,6 @@ typedef __spin_lock_t __pthread_spinlock_t; #error __SPIN_LOCK_INITIALIZER undefined: should be defined by <lock-intern.h>. #endif -#if defined __USE_EXTERN_INLINES || defined _FORCE_INLINES - -# ifndef __EBUSY -# include <errno.h> -# define __EBUSY EBUSY -# endif - -# ifndef __PT_SPIN_INLINE -# define __PT_SPIN_INLINE __extern_inline -# endif - -__PT_SPIN_INLINE int __pthread_spin_destroy (__pthread_spinlock_t *__lock); - -__PT_SPIN_INLINE int -__pthread_spin_destroy (__pthread_spinlock_t *__lock) -{ - return 0; -} - -__PT_SPIN_INLINE int __pthread_spin_init (__pthread_spinlock_t *__lock, - int __pshared); - -__PT_SPIN_INLINE int -__pthread_spin_init (__pthread_spinlock_t *__lock, int __pshared) -{ - *__lock = __SPIN_LOCK_INITIALIZER; - return 0; -} - -__PT_SPIN_INLINE int __pthread_spin_trylock (__pthread_spinlock_t *__lock); - -__PT_SPIN_INLINE int -__pthread_spin_trylock (__pthread_spinlock_t *__lock) -{ - return __spin_try_lock (__lock) ? 0 : __EBUSY; -} - -__extern_inline int __pthread_spin_lock (__pthread_spinlock_t *__lock); -extern int _pthread_spin_lock (__pthread_spinlock_t *__lock); - -__extern_inline int -__pthread_spin_lock (__pthread_spinlock_t *__lock) -{ - if (__pthread_spin_trylock (__lock)) - return _pthread_spin_lock (__lock); - return 0; -} - -__PT_SPIN_INLINE int __pthread_spin_unlock (__pthread_spinlock_t *__lock); - -__PT_SPIN_INLINE int -__pthread_spin_unlock (__pthread_spinlock_t *__lock) -{ - __spin_unlock (__lock); - return 0; -} - -#endif /* Use extern inlines or force inlines. */ - __END_DECLS #endif /* bits/spin-lock.h */ |