20 lines
289 B
C
20 lines
289 B
C
|
#pragma once
|
||
|
|
||
|
#include "kthread.h"
|
||
|
|
||
|
struct wait_queue {
|
||
|
struct kthread *thread;
|
||
|
struct wait_queue *next;
|
||
|
struct wait_queue *prev;
|
||
|
};
|
||
|
|
||
|
struct semaphore {
|
||
|
int count;
|
||
|
struct wait_queue *wait;
|
||
|
};
|
||
|
|
||
|
struct mutex {
|
||
|
struct kthread *owner;
|
||
|
struct wait_queue *wait;
|
||
|
};
|