Restore changes to spinlock macros before merge.
This commit is contained in:
parent
79fde20246
commit
6c0a366182
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=159496
@ -11,8 +11,7 @@
|
||||
/*
|
||||
* Map the spinlocks from IRIX to FreeBSD
|
||||
*/
|
||||
/* These spin locks should map to mutex_spin locks? */
|
||||
#define spinlock_init(lock, name) mtx_init(lock, name, NULL, /*MTX_SPIN*/ MTX_DEF)
|
||||
#define spinlock_init(lock, name) mtx_init(lock, name, NULL, MTX_DEF)
|
||||
#define spinlock_destroy(lock) mtx_destroy(lock)
|
||||
|
||||
/*
|
||||
@ -24,21 +23,20 @@ typedef struct mtx lock_t;
|
||||
#define nested_spinlock(lock) mtx_lock(lock)
|
||||
#define nested_spintrylock(lock) mtx_trylock(lock)
|
||||
|
||||
#define spin_lock(lock) mtx_lock_spin(lock)
|
||||
#define spin_unlock(lock) mtx_unlock_spin(lock)
|
||||
#define spin_lock(lock) mtx_lock(lock)
|
||||
#define spin_unlock(lock) mtx_unlock(lock)
|
||||
|
||||
#if 0
|
||||
#if LOCK_DEBUG > 0
|
||||
#define mutex_spinlock(lock) (spin_lock(lock),0)
|
||||
#else
|
||||
static __inline register_t
|
||||
mutex_spinlock(lock_t *lock) { mtx_lock(lock); return 0; }
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#define mutex_spinlock(lock) (mtx_lock(lock),0)
|
||||
#define mutex_spinunlock(lock,s) mtx_unlock(lock)
|
||||
//#define mutex_spinlock(lock) (mtx_lock_spin(lock),0)
|
||||
//#define mutex_spinunlock(lock,s) mtx_unlock_spin(lock)
|
||||
#define mutex_spinunlock(lock,s) \
|
||||
do { \
|
||||
spin_unlock(lock); \
|
||||
if (&s) {} \
|
||||
} while (0)
|
||||
|
||||
#endif /* __XFS_SUPPORT_SPIN_H__ */
|
||||
|
Loading…
Reference in New Issue
Block a user