diff options
author | kaf24@freefall.cl.cam.ac.uk <kaf24@freefall.cl.cam.ac.uk> | 2004-08-27 16:01:06 +0000 |
---|---|---|
committer | kaf24@freefall.cl.cam.ac.uk <kaf24@freefall.cl.cam.ac.uk> | 2004-08-27 16:01:06 +0000 |
commit | 9b83ae02b774e13d3aa218e747fa5cbeef505d0b (patch) | |
tree | ea5eb82c1d0d90bcd8bc2ab58f1083d4b1ae043c /xen/include/xen/spinlock.h | |
parent | d3e1f31e5ab62f735e04378470199257de08cd3a (diff) | |
download | xen-9b83ae02b774e13d3aa218e747fa5cbeef505d0b.tar.gz xen-9b83ae02b774e13d3aa218e747fa5cbeef505d0b.tar.bz2 xen-9b83ae02b774e13d3aa218e747fa5cbeef505d0b.zip |
bitkeeper revision 1.1159.62.1 (412f5ac2sXlMhMeRveH20BE_o6ZJVw)
Allow shadow p.t. code to do unsafe things with shadow locks held.
Diffstat (limited to 'xen/include/xen/spinlock.h')
-rw-r--r-- | xen/include/xen/spinlock.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/xen/include/xen/spinlock.h b/xen/include/xen/spinlock.h index 0b4503d999..fc2409f13d 100644 --- a/xen/include/xen/spinlock.h +++ b/xen/include/xen/spinlock.h @@ -78,6 +78,7 @@ extern void criticalregion_enter(void); extern void criticalregion_exit(void); extern void ASSERT_no_criticalregion(void); extern void disable_criticalregion_checking(void); +extern void enable_criticalregion_checking(void); #define spin_lock(_lock) \ do { criticalregion_enter(); _raw_spin_lock(_lock); } while (0) @@ -111,6 +112,7 @@ static inline int spin_trylock(spinlock_t *lock) #define ASSERT_no_criticalregion() ((void)0) #define disable_criticalregion_checking() ((void)0) +#define enable_criticalregion_checking() ((void)0) #define spin_lock(_lock) _raw_spin_lock(_lock) #define spin_trylock(_lock) _raw_spin_trylock(_lock) @@ -124,4 +126,13 @@ static inline int spin_trylock(spinlock_t *lock) #endif +/* + * Use these if you have taken special care to ensure that certain unsafe + * things can occur in your critical region (e.g., faults, user-space + * accesses). + */ +#define spin_lock_nochecking(_lock) _raw_spin_lock(_lock) +#define spin_trylock_nochecking(_lock) _raw_spin_trylock(_lock) +#define spin_unlock_nochecking(_lock) _raw_spin_unlock(_lock) + #endif /* __SPINLOCK_H__ */ |