[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] [xen-unstable] x86, spinlock: Always inline raw spinlock functions.



# HG changeset patch
# User Keir Fraser <keir.fraser@xxxxxxxxxx>
# Date 1224521136 -3600
# Node ID 1eba0c88655f21ab723b36224b28f04ad58da3ad
# Parent  7989e3999e8392751f735abe936af58443f776d7
x86, spinlock: Always inline raw spinlock functions.
Signed-off-by: Keir Fraser <keir.fraser@xxxxxxxxxx>
---
 xen/include/asm-x86/spinlock.h |   10 +++++-----
 1 files changed, 5 insertions(+), 5 deletions(-)

diff -r 7989e3999e83 -r 1eba0c88655f xen/include/asm-x86/spinlock.h
--- a/xen/include/asm-x86/spinlock.h    Mon Oct 20 17:17:55 2008 +0100
+++ b/xen/include/asm-x86/spinlock.h    Mon Oct 20 17:45:36 2008 +0100
@@ -15,7 +15,7 @@ typedef struct {
 #define _raw_spin_is_locked(x)                  \
     (*(volatile char *)(&(x)->lock) <= 0)
 
-static inline void _raw_spin_lock(raw_spinlock_t *lock)
+static always_inline void _raw_spin_lock(raw_spinlock_t *lock)
 {
     asm volatile (
         "1:  lock; decw %0         \n"
@@ -28,7 +28,7 @@ static inline void _raw_spin_lock(raw_sp
         : "=m" (lock->lock) : : "memory" );
 }
 
-static inline void _raw_spin_unlock(raw_spinlock_t *lock)
+static always_inline void _raw_spin_unlock(raw_spinlock_t *lock)
 {
     ASSERT(_raw_spin_is_locked(lock));
     asm volatile (
@@ -36,7 +36,7 @@ static inline void _raw_spin_unlock(raw_
         : "=m" (lock->lock) : : "memory" );
 }
 
-static inline int _raw_spin_trylock(raw_spinlock_t *lock)
+static always_inline int _raw_spin_trylock(raw_spinlock_t *lock)
 {
     s16 oldval;
     asm volatile (
@@ -56,12 +56,12 @@ typedef struct {
  * On x86, we implement read-write locks as a 32-bit counter
  * with the high bit (sign) being the "contended" bit.
  */
-static inline void _raw_read_lock(raw_rwlock_t *rw)
+static always_inline void _raw_read_lock(raw_rwlock_t *rw)
 {
     __build_read_lock(rw, "__read_lock_failed");
 }
 
-static inline void _raw_write_lock(raw_rwlock_t *rw)
+static always_inline void _raw_write_lock(raw_rwlock_t *rw)
 {
     __build_write_lock(rw, "__write_lock_failed");
 }

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.