mirror of
https://github.com/drasko/codezero.git
synced 2026-01-18 22:03:16 +01:00
Added mutex_control syscall for userspace mutexes.
- Compiles and Codezero runs as normal without touching mutex implementation - Mutex implementation needs testing. The mutex control syscall allows userspace programs to declare any virtual address as a mutex lock and ask for help from the kernel syscall for resolving locking contentions.
This commit is contained in:
@@ -10,6 +10,8 @@ struct waitqueue {
|
||||
struct ktcb *task;
|
||||
};
|
||||
|
||||
#define WAKEUP_ASYNC 0
|
||||
|
||||
enum wakeup_flags {
|
||||
WAKEUP_INTERRUPT = (1 << 0),
|
||||
WAKEUP_SYNC = (1 << 1)
|
||||
@@ -74,5 +76,7 @@ void wake_up(struct waitqueue_head *wqh, unsigned int flags);
|
||||
int wake_up_task(struct ktcb *task, unsigned int flags);
|
||||
void wake_up_all(struct waitqueue_head *wqh, unsigned int flags);
|
||||
|
||||
int wait_on(struct waitqueue_head *wqh);
|
||||
|
||||
#endif /* __LIB_WAIT_H__ */
|
||||
|
||||
|
||||
Reference in New Issue
Block a user