diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/cpu.h | 5 | ||||
-rw-r--r-- | include/sys/schedule.h | 2 |
2 files changed, 4 insertions, 3 deletions
diff --git a/include/cpu.h b/include/cpu.h index c15c086..bac80e8 100644 --- a/include/cpu.h +++ b/include/cpu.h @@ -91,11 +91,12 @@ __attribute__((always_inline)) static inline unsigned long long get_sys_time(voi }s; unsigned long long llv; }t; - asm volatile("svc #1\nmov %0, r0\nmov %0, r1" : "=r"(t.s.lo), "=r"(t.s.hi)); + asm volatile("svc #1\nmov %0, r1\nmov %1, r0" : "=r"(t.s.lo), "=r"(t.s.hi)); return t.llv; } -#define SYS_SCHED 2 +#define SYS_YIELD 0 #define SYS_TIME 1 +#define SYS_SCHED 2 #endif diff --git a/include/sys/schedule.h b/include/sys/schedule.h index 4d331a6..cb784c5 100644 --- a/include/sys/schedule.h +++ b/include/sys/schedule.h @@ -64,6 +64,6 @@ struct Thread* next_thread(void); /// to user mode then calls the SVC call extern void schedule(void); extern void cleanup(void); -// void yield(void); +void yield(void); #endif |