Changeset c47e1a8 in mainline for kernel/generic/include/synch/spinlock.h
- Timestamp:
- 2010-05-21T07:50:04Z (16 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- d51ee2b
- Parents:
- cf8cc36 (diff), 15b592b (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)links above to see all the changes relative to each parent. - File:
-
- 1 edited
-
kernel/generic/include/synch/spinlock.h (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
kernel/generic/include/synch/spinlock.h
rcf8cc36 rc47e1a8 36 36 #define KERN_SPINLOCK_H_ 37 37 38 #include < arch/types.h>38 #include <typedefs.h> 39 39 #include <arch/barrier.h> 40 40 #include <preemption.h> … … 48 48 49 49 #ifdef CONFIG_DEBUG_SPINLOCK 50 c har *name;50 const char *name; 51 51 #endif 52 52 } spinlock_t; … … 77 77 } 78 78 79 #define spinlock_lock(lock) spinlock_lock_debug(lock) 79 #define spinlock_lock(lock) spinlock_lock_debug((lock)) 80 #define spinlock_unlock(lock) spinlock_unlock_debug((lock)) 80 81 81 82 #else … … 91 92 } 92 93 93 #define spinlock_lock(lock) atomic_lock_arch(&(lock)->val) 94 #define spinlock_lock(lock) atomic_lock_arch(&(lock)->val) 95 #define spinlock_unlock(lock) spinlock_unlock_nondebug((lock)) 94 96 95 97 #endif … … 101 103 SPINLOCK_STATIC_INITIALIZE_NAME(lock_name, #lock_name) 102 104 103 extern void spinlock_initialize(spinlock_t *lock, c har *name);105 extern void spinlock_initialize(spinlock_t *lock, const char *name); 104 106 extern int spinlock_trylock(spinlock_t *lock); 105 107 extern void spinlock_lock_debug(spinlock_t *lock); 108 extern void spinlock_unlock_debug(spinlock_t *lock); 106 109 107 110 /** Unlock spinlock 108 111 * 109 * Unlock spinlock .112 * Unlock spinlock for non-debug kernels. 110 113 * 111 114 * @param sl Pointer to spinlock_t structure. 112 115 */ 113 static inline void spinlock_unlock (spinlock_t *lock)116 static inline void spinlock_unlock_nondebug(spinlock_t *lock) 114 117 { 115 ASSERT(atomic_get(&lock->val) != 0);116 117 118 /* 118 119 * Prevent critical section code from bleeding out this way down.
Note:
See TracChangeset
for help on using the changeset viewer.
