#ifndef KERNEL_SPINLOCK_H #define KERNEL_SPINLOCK_H #include #include /* Structure for a spinlock */ typedef struct Spinlock { uint32_t locked; pid_t task; uint8_t cpu; uint8_t ref; } Spinlock; void init_lock(Spinlock *lock); void acquire(Spinlock *lock); void release(Spinlock *lock); #endif