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/schedule.c2
-rw-r--r--src/sys/timer.c10
3 files changed, 1 insertions, 13 deletions
diff --git a/src/sys/core.c b/src/sys/core.c
index e987e8c..9803488 100644
--- a/src/sys/core.c
+++ b/src/sys/core.c
@@ -18,8 +18,6 @@
void sysinit(void)
{
// Initialize System Globals
- exe_cnt_m.addr = &exe_cnt;
- exe_cnt_m.pid = NULL_PID;
stimeh = *(unsigned long*)SYS_TIMER_CHI;
stimel = *(unsigned long*)SYS_TIMER_CLO;
*(unsigned long*) SYS_TIMER_C0 = 60000000 + stimeh; // 60 second trigger
diff --git a/src/sys/schedule.c b/src/sys/schedule.c
index 5a45b53..5c7a546 100644
--- a/src/sys/schedule.c
+++ b/src/sys/schedule.c
@@ -34,7 +34,7 @@ void init_scheduler(void)
}
}
// Initialize nextpid
- nextpid = SCHED_PID + 1;
+ nextpid = FIRST_AVAIL_PID;
}
struct RStack get_stack(void)
diff --git a/src/sys/timer.c b/src/sys/timer.c
index 548bf1a..c8f9922 100644
--- a/src/sys/timer.c
+++ b/src/sys/timer.c
@@ -8,20 +8,10 @@
#include <util/time.h>
#include <symbols.h>
-void increase_counter(void)
-{
- if (lock_mutex(&exe_cnt_m, SCHED_PID) == 0) {
- unsigned long* counter = (unsigned long*)exe_cnt_m.addr;
- *counter += 1;
- release_mutex(&exe_cnt_m, SCHED_PID);
- }
-}
-
void c_timer(void)
{
// Reset the counter
write_cntv_tval(cntfrq/CPS);
- increase_counter();
status();
}