aboutsummaryrefslogtreecommitdiff
path: root/src/util/mutex.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/util/mutex.c')
-rw-r--r--src/util/mutex.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/util/mutex.c b/src/util/mutex.c
index 9cfdf6c..2637a6c 100644
--- a/src/util/mutex.c
+++ b/src/util/mutex.c
@@ -1,9 +1,9 @@
-#include "../util/mutex.h"
#include "../cpu/atomic/swap.h"
+#include "../util/mutex.h"
-unsigned char lock_mutex(struct Mutex* m, unsigned long pid) {
+unsigned char lock_mutex(struct Mutex* m, unsigned long pid)
+{
if (m->pid == NULL_PID) {
- //m->pid = pid;
atm_lock(pid, &m->pid);
return 0;
}
@@ -13,9 +13,9 @@ unsigned char lock_mutex(struct Mutex* m, unsigned long pid) {
// Eventually, there will need to be a hook into the scheduling mechanism
// that checks the currently running process and check that against the
// mutex's pid lock
-unsigned char release_mutex(struct Mutex* m, unsigned long pid) {
+unsigned char release_mutex(struct Mutex* m, unsigned long pid)
+{
if (m->pid == pid) {
- //m->pid = NULL_PID;
atm_release(&m->pid);
return 0;
}