makefile: introduce a format command to run clang-format all over the kernel source.
This commit is contained in:
parent
c4e98f5ef2
commit
a379d66784
47 changed files with 5092 additions and 4603 deletions
|
@ -2,17 +2,16 @@
|
|||
|
||||
#include <stdint.h>
|
||||
|
||||
typedef struct spinlock
|
||||
{
|
||||
volatile int locked;
|
||||
typedef struct spinlock {
|
||||
volatile int locked;
|
||||
} spinlock_t;
|
||||
|
||||
inline void spinlock_acquire(spinlock_t *lock) {
|
||||
while (__sync_lock_test_and_set(&(lock)->locked, 1))
|
||||
while ((lock)->locked)
|
||||
__asm__ volatile("pause");
|
||||
while (__sync_lock_test_and_set(&(lock)->locked, 1))
|
||||
while ((lock)->locked)
|
||||
__asm__ volatile("pause");
|
||||
}
|
||||
|
||||
inline void spinlock_release(spinlock_t *lock) {
|
||||
__sync_lock_release(&(lock)->locked);
|
||||
__sync_lock_release(&(lock)->locked);
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue