From cf7cd8be60c254b44b444c97dcb238d7cf3afd4c Mon Sep 17 00:00:00 2001 From: Brett Weiland Date: Tue, 21 Sep 2021 10:50:33 -0500 Subject: palloc smp safe (testing required, NOT pfree) --- src/include/smp_sync.h | 23 ----------------------- 1 file changed, 23 deletions(-) delete mode 100644 src/include/smp_sync.h (limited to 'src/include/smp_sync.h') diff --git a/src/include/smp_sync.h b/src/include/smp_sync.h deleted file mode 100644 index 93aac35..0000000 --- a/src/include/smp_sync.h +++ /dev/null @@ -1,23 +0,0 @@ -#ifndef SMP_SYNC_INCLUDED -#define SMP_SYNC_INCLUDED - -static inline void lock(uint8_t *lock) { - asm("mov al, 1\n" - "spinlock:\n" - "lock xchgb [%0], al\n" - "test al, al\n" - "pause\n" - "jnz spinlock\n" - ::"r"(lock):"al"); -} - -static inline void unlock(uint8_t *lock) { - asm("lock andb [%0], 0"::"r"(lock)); -} - -static inline void waitup(uint8_t *loto) { -} - -#define CREATE_LOTO(name) - -#endif -- cgit v1.2.3