diff options
author | Marvin Borner | 2020-08-16 00:44:53 +0200 |
---|---|---|
committer | Marvin Borner | 2020-08-16 00:44:53 +0200 |
commit | c4a0bc2571162ad83fc51eb823f1c535336041bf (patch) | |
tree | cba1169a027fea8884e882be601bf3cbaeaab654 /libc/inc/sys.h | |
parent | 9a827eb5f6ff58bf801bc98bcb653876428ebe69 (diff) |
Added psf/gui to libgui
...and some other things
Diffstat (limited to 'libc/inc/sys.h')
-rw-r--r-- | libc/inc/sys.h | 7 |
1 files changed, 6 insertions, 1 deletions
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 |