Minor changes to build system
This commit is contained in:
parent
f478f8d38b
commit
a7fd9ac224
16 changed files with 391 additions and 224 deletions
|
|
@ -1,9 +1,23 @@
|
|||
#include <error.h>
|
||||
#include <stdatomic.h>
|
||||
#include <stdbool.h>
|
||||
|
||||
#ifndef SPINLOCK_H
|
||||
#define SPINLOCK_H
|
||||
|
||||
struct mutex {
|
||||
atomic_flag lock;
|
||||
bool locked;
|
||||
struct thread *holder;
|
||||
};
|
||||
|
||||
void acquire_spinlock(atomic_flag *lock);
|
||||
void free_spinlock(atomic_flag *lock);
|
||||
|
||||
struct mutex *init_mutex();
|
||||
kstatus acquire_mutex(struct mutex *mut);
|
||||
void free_mutex(struct mutex *mut);
|
||||
kstatus try_mutex(struct mutex *mut);
|
||||
|
||||
|
||||
#endif
|
||||
Loading…
Add table
Add a link
Reference in a new issue