From e71ca9d94c38d61096e587e1fa17a8b79cd89397 Mon Sep 17 00:00:00 2001 From: Christian Cunningham Date: Tue, 1 Feb 2022 18:25:51 -0700 Subject: Started syscalling --- include/cpu.h | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'include') diff --git a/include/cpu.h b/include/cpu.h index 68638a5..52d016b 100644 --- a/include/cpu.h +++ b/include/cpu.h @@ -76,4 +76,11 @@ static inline void* getirqstack(void) return sp; } +#define syscall_h_quote(text) #text +#define syscall_h_expand_and_quote(text) syscall_h_quote(text) + +#define sys0(sys_n) asm volatile("svc #" syscall_h_expand_and_quote(sys_n) ::: "r0", "r1", "r2", "r3", "lr"); + +#define SYS_SCHED 2 + #endif -- cgit v1.2.1