Mon 14 Oct 23:06:38 CEST 2024
This commit is contained in:
parent
287a623976
commit
3d38b5af98
22
kernel/mutex.h
Normal file
22
kernel/mutex.h
Normal file
|
@ -0,0 +1,22 @@
|
||||||
|
/*
|
||||||
|
Copyright (C) 2015-2019 The University of Notre Dame
|
||||||
|
This software is distributed under the GNU General Public License.
|
||||||
|
See the file LICENSE for details.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef MUTEX_H
|
||||||
|
#define MUTEX_H
|
||||||
|
|
||||||
|
#include "list.h"
|
||||||
|
|
||||||
|
struct mutex {
|
||||||
|
int locked;
|
||||||
|
struct list waitqueue;
|
||||||
|
};
|
||||||
|
|
||||||
|
#define MUTEX_INIT {0,LIST_INIT}
|
||||||
|
|
||||||
|
void mutex_lock(struct mutex *m);
|
||||||
|
void mutex_unlock(struct mutex *m);
|
||||||
|
|
||||||
|
#endif
|
Loading…
Reference in New Issue
Block a user