sandbox: moved all sources to main kernel tree

This commit is contained in:
2023-02-03 20:43:38 +00:00
parent e714d619ba
commit 40f83922da
18 changed files with 0 additions and 9 deletions

14
kernel/spinlock.c Normal file
View File

@@ -0,0 +1,14 @@
#include <socks/locks.h>
void spin_lock_irqsave(spin_lock_t *lck, unsigned long *flags)
{
while (!__sync_bool_compare_and_swap(lck, 0, 1)) {
/* pause */
}
}
void spin_unlock_irqrestore(spin_lock_t *lck, unsigned long flags)
{
__sync_lock_release(lck);
}