aboutsummaryrefslogtreecommitdiff
path: root/src/sys
diff options
context:
space:
mode:
authorChristian Cunningham <cc@localhost>2022-01-02 16:07:28 -0800
committerChristian Cunningham <cc@localhost>2022-01-02 16:07:28 -0800
commit8823cb198dff5ef086fb70da93d1134423e8198b (patch)
tree892b3d08ce83e070dce5f3b403e7fdef4e3eb00f /src/sys
parent059f08cb73ef2b1631f2c89f8c524e27888f6ba5 (diff)
Fixed mutex pointer type
Diffstat (limited to 'src/sys')
-rw-r--r--src/sys/core.c2
-rw-r--r--src/sys/timer.c5
2 files changed, 4 insertions, 3 deletions
diff --git a/src/sys/core.c b/src/sys/core.c
index ebf50a0..079fc78 100644
--- a/src/sys/core.c
+++ b/src/sys/core.c
@@ -105,7 +105,7 @@ void postinit(void)
write_cstring(&g_Drawer, os_info_v, 0x00FFFF);
write_string(&g_Drawer, " #");
if (lock_mutex(&exe_cnt_m, SYS_PID) == 0) {
- write_10(&g_Drawer, *(exe_cnt_m.addr));
+ write_10(&g_Drawer, *((unsigned long*)exe_cnt_m.addr));
release_mutex(&exe_cnt_m, SYS_PID);
}
diff --git a/src/sys/timer.c b/src/sys/timer.c
index 207ea09..c3ae53b 100644
--- a/src/sys/timer.c
+++ b/src/sys/timer.c
@@ -26,12 +26,13 @@ void c_timer(void)
// Lock the execution counter
if (lock_mutex(&exe_cnt_m, SCHED_PID) == 0) {
- *(exe_cnt_m.addr) += 1;
+ unsigned long* counter = (unsigned long*)exe_cnt_m.addr;
+ *counter += 1;
write_cstring(&g_Drawer, "DendritOS", 0xFF0000);
write_cstring(&g_Drawer, " v", 0x00FFFF);
write_cstring(&g_Drawer, os_info_v, 0x00FFFF);
write_string(&g_Drawer, " #");
- write_10(&g_Drawer, *(exe_cnt_m.addr));
+ write_10(&g_Drawer, *((unsigned long*)exe_cnt_m.addr));
release_mutex(&exe_cnt_m, SCHED_PID);
}