clang-format
This commit is contained in:
@@ -56,19 +56,19 @@
|
||||
* the structure directly but always use the spinlock API functions.
|
||||
*/
|
||||
struct spinlock {
|
||||
volatile spinlock_data_t splk_lock; /* Memory word where we spin. */
|
||||
struct cpu *splk_holder; /* CPU holding this lock. */
|
||||
HANGMAN_LOCKABLE(splk_hangman); /* Deadlock detector hook. */
|
||||
volatile spinlock_data_t splk_lock; /* Memory word where we spin. */
|
||||
struct cpu *splk_holder; /* CPU holding this lock. */
|
||||
HANGMAN_LOCKABLE(splk_hangman); /* Deadlock detector hook. */
|
||||
};
|
||||
|
||||
/*
|
||||
* Initializer for cases where a spinlock needs to be static or global.
|
||||
*/
|
||||
#ifdef OPT_HANGMAN
|
||||
#define SPINLOCK_INITIALIZER { SPINLOCK_DATA_INITIALIZER, NULL, \
|
||||
HANGMAN_LOCKABLE_INITIALIZER }
|
||||
#define SPINLOCK_INITIALIZER \
|
||||
{SPINLOCK_DATA_INITIALIZER, NULL, HANGMAN_LOCKABLE_INITIALIZER}
|
||||
#else
|
||||
#define SPINLOCK_INITIALIZER { SPINLOCK_DATA_INITIALIZER, NULL }
|
||||
#define SPINLOCK_INITIALIZER {SPINLOCK_DATA_INITIALIZER, NULL}
|
||||
#endif
|
||||
|
||||
/*
|
||||
@@ -91,5 +91,4 @@ void spinlock_release(struct spinlock *lk);
|
||||
|
||||
bool spinlock_do_i_hold(struct spinlock *lk);
|
||||
|
||||
|
||||
#endif /* _SPINLOCK_H_ */
|
||||
|
||||
Reference in New Issue
Block a user