makefile: introduce a format command to run clang-format all over the kernel source.

This commit is contained in:
RaphProductions 2025-05-11 11:45:04 +02:00
parent c4e98f5ef2
commit a379d66784
47 changed files with 5092 additions and 4603 deletions

View file

@ -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);
}