aboutsummaryrefslogtreecommitdiff
path: root/src/sys
diff options
context:
space:
mode:
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);
}