From c4a0bc2571162ad83fc51eb823f1c535336041bf Mon Sep 17 00:00:00 2001 From: Marvin Borner Date: Sun, 16 Aug 2020 00:44:53 +0200 Subject: Added psf/gui to libgui ...and some other things --- libc/inc/sys.h | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'libc/inc/sys.h') diff --git a/libc/inc/sys.h b/libc/inc/sys.h index 16d3c4f..d95b760 100644 --- a/libc/inc/sys.h +++ b/libc/inc/sys.h @@ -4,7 +4,9 @@ #ifndef SYS_H #define SYS_H -enum sys { SYS_LOOP, SYS_MALLOC, SYS_FREE, SYS_EXEC, SYS_EXIT }; +enum sys { SYS_LOOP, SYS_MALLOC, SYS_FREE, SYS_READ, SYS_WRITE, SYS_EXEC, SYS_EXIT }; + +#if defined(userspace) int sys0(enum sys num); int sys1(enum sys num, int d1); @@ -18,6 +20,8 @@ int sys5(enum sys num, int d1, int d2, int d3, int d4, int d5); */ #define loop() sys0(SYS_LOOP) +#define read(path) (void *)sys1(SYS_READ, (int)path) +#define write(path, buf) sys2(SYS_WRITE, (int)path, buf) #define exec(path) sys1(SYS_EXEC, (int)path) #define exit() \ sys0(SYS_EXIT); \ @@ -25,3 +29,4 @@ int sys5(enum sys num, int d1, int d2, int d3, int d4, int d5); } #endif +#endif -- cgit v1.2.3