ia64/xen-unstable

changeset 18670:1eba0c88655f

x86, spinlock: Always inline raw spinlock functions.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
author Keir Fraser <keir.fraser@citrix.com>
date Mon Oct 20 17:45:36 2008 +0100 (2008-10-20)
parents 7989e3999e83
children a9f299b11b7f
files xen/include/asm-x86/spinlock.h
line diff
     1.1 --- a/xen/include/asm-x86/spinlock.h	Mon Oct 20 17:17:55 2008 +0100
     1.2 +++ b/xen/include/asm-x86/spinlock.h	Mon Oct 20 17:45:36 2008 +0100
     1.3 @@ -15,7 +15,7 @@ typedef struct {
     1.4  #define _raw_spin_is_locked(x)                  \
     1.5      (*(volatile char *)(&(x)->lock) <= 0)
     1.6  
     1.7 -static inline void _raw_spin_lock(raw_spinlock_t *lock)
     1.8 +static always_inline void _raw_spin_lock(raw_spinlock_t *lock)
     1.9  {
    1.10      asm volatile (
    1.11          "1:  lock; decw %0         \n"
    1.12 @@ -28,7 +28,7 @@ static inline void _raw_spin_lock(raw_sp
    1.13          : "=m" (lock->lock) : : "memory" );
    1.14  }
    1.15  
    1.16 -static inline void _raw_spin_unlock(raw_spinlock_t *lock)
    1.17 +static always_inline void _raw_spin_unlock(raw_spinlock_t *lock)
    1.18  {
    1.19      ASSERT(_raw_spin_is_locked(lock));
    1.20      asm volatile (
    1.21 @@ -36,7 +36,7 @@ static inline void _raw_spin_unlock(raw_
    1.22          : "=m" (lock->lock) : : "memory" );
    1.23  }
    1.24  
    1.25 -static inline int _raw_spin_trylock(raw_spinlock_t *lock)
    1.26 +static always_inline int _raw_spin_trylock(raw_spinlock_t *lock)
    1.27  {
    1.28      s16 oldval;
    1.29      asm volatile (
    1.30 @@ -56,12 +56,12 @@ typedef struct {
    1.31   * On x86, we implement read-write locks as a 32-bit counter
    1.32   * with the high bit (sign) being the "contended" bit.
    1.33   */
    1.34 -static inline void _raw_read_lock(raw_rwlock_t *rw)
    1.35 +static always_inline void _raw_read_lock(raw_rwlock_t *rw)
    1.36  {
    1.37      __build_read_lock(rw, "__read_lock_failed");
    1.38  }
    1.39  
    1.40 -static inline void _raw_write_lock(raw_rwlock_t *rw)
    1.41 +static always_inline void _raw_write_lock(raw_rwlock_t *rw)
    1.42  {
    1.43      __build_write_lock(rw, "__write_lock_failed");
    1.44  }