aboutsummaryrefslogtreecommitdiff
path: root/src/util
diff options
context:
space:
mode:
Diffstat (limited to 'src/util')
-rw-r--r--src/util/mutex.c10
-rw-r--r--src/util/time.c1
2 files changed, 5 insertions, 6 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;
}
diff --git a/src/util/time.c b/src/util/time.c
index 3db2cad..f6d8f04 100644
--- a/src/util/time.c
+++ b/src/util/time.c
@@ -2,7 +2,6 @@
void routing_core0cntv_to_core0irq(void)
{
- // IRQ
store32(0x08, CORE0_TIMER_IRQCNTL);
}