kernel: add basic spinlocks

This commit is contained in:
2023-02-04 17:46:05 +00:00
parent 6e290ee18a
commit d0a431c860
5 changed files with 125 additions and 18 deletions

View File

@@ -0,0 +1,14 @@
#ifndef SOCKS_X86_64_HWLOCK_H_
#define SOCKS_X86_64_HWLOCK_H_
#define ML_HWLOCK_INIT (0)
typedef int ml_hwlock_t;
extern void ml_hwlock_lock(ml_hwlock_t *lck);
extern void ml_hwlock_unlock(ml_hwlock_t *lck);
extern void ml_hwlock_lock_irqsave(ml_hwlock_t *lck, unsigned long *flags);
extern void ml_hwlock_unlock_irqrestore(ml_hwlock_t *lck, unsigned long flags);
#endif