aboutsummaryrefslogtreecommitdiff
path: root/src/util/mutex.c
diff options
context:
space:
mode:
authorChristian Cunningham <cc@localhost>2021-12-24 15:21:54 -0800
committerChristian Cunningham <cc@localhost>2021-12-24 15:21:54 -0800
commit3a366988a0077474075d8f33ad76514d2fa0c5d6 (patch)
tree7aa293e59bee8308825e029069d395c628d230cd /src/util/mutex.c
parentd44bf5acb015edaeacc022f423bae4743b868f53 (diff)
Standardized Formatting
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;
}