aboutsummaryrefslogtreecommitdiff
path: root/src/sys/timer.c
diff options
context:
space:
mode:
authorChristian Cunningham <cc@localhost>2021-12-04 19:24:16 -0700
committerChristian Cunningham <cc@localhost>2021-12-04 19:24:16 -0700
commite842c512179d3f34731ce78e3a906c5fec162e07 (patch)
treeeba577f86bafe3171441fb54de8d1487576c6c3f /src/sys/timer.c
parentee7d1dea9de7723a92c4598814e5f1cff67c0d07 (diff)
Created UART console layout
Diffstat (limited to 'src/sys/timer.c')
-rw-r--r--src/sys/timer.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/src/sys/timer.c b/src/sys/timer.c
index 16e6fdb..13ce317 100644
--- a/src/sys/timer.c
+++ b/src/sys/timer.c
@@ -5,10 +5,11 @@
#include "../drivers/uart.a.h"
#include "../drivers/uart.h"
-static unsigned long exe_cnt = 0;
-static struct Mutex exe_cnt_m = {.addr = &exe_cnt, .pid = NULL_PID};
+#define TIMER_C
+extern char* os_info_v;
-//static unsigned long execution_count = 0;
+unsigned long exe_cnt = 0;
+struct Mutex exe_cnt_m = {.addr = &exe_cnt, .pid = NULL_PID};
void c_timer() {
// Reset the counter
@@ -24,9 +25,11 @@ void c_timer() {
// Lock the execution counter
if (lock_mutex(&exe_cnt_m, SCHED_PID) == 0) {
*(exe_cnt_m.addr) += 1;
- uart_string((char*)"Executed #");
+ uart_string("\033[?25l\033[s\033[1;1H\033[91mDendritOS \033[96mv");
+ uart_string(os_info_v);
+ uart_string("\033[0m #");
uart_10(*(exe_cnt_m.addr));
- uart_string((char*)" Times\n");
+ uart_string("\033[u\033[?25h");
release_mutex(&exe_cnt_m, SCHED_PID);
}
}