lib: move lock/atomic into lib folder

This commit is contained in:
Michael Shaw 2024-03-19 00:19:42 -04:00
commit e4116bd3e8
2 changed files with 0 additions and 0 deletions

View file

@ -1,13 +0,0 @@
#include <kernel/common.h>
#include <kernel/lock.h>
void spinlock_acquire(spinlock_t *lock)
{
while (atomic_cmpxchg(lock, 0, 1))
;
}
void spinlock_release(spinlock_t *lock)
{
atomic_cmpxchg(lock, 1, 0);
}