diff options
author | Marvin Borner | 2020-08-16 15:35:43 +0200 |
---|---|---|
committer | Marvin Borner | 2020-08-16 15:35:43 +0200 |
commit | 36e36fae364dec02999f58edbe997780d901b674 (patch) | |
tree | 8b06909e475ef84201ca2ef9375880249b1d5e68 /libc/inc/sys.h | |
parent | c4a0bc2571162ad83fc51eb823f1c535336041bf (diff) |
Added WM and exec parameters
Diffstat (limited to 'libc/inc/sys.h')
-rw-r--r-- | libc/inc/sys.h | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/libc/inc/sys.h b/libc/inc/sys.h index d95b760..0914bc4 100644 --- a/libc/inc/sys.h +++ b/libc/inc/sys.h @@ -14,6 +14,7 @@ int sys2(enum sys num, int d1, int d2); int sys3(enum sys num, int d1, int d2, int d3); int sys4(enum sys num, int d1, int d2, int d3, int d4); int sys5(enum sys num, int d1, int d2, int d3, int d4, int d5); +int sysv(enum sys num, ...); /** * Wrappers @@ -22,10 +23,12 @@ 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 exec(path, ...) sysv(SYS_EXEC, (int)path, ##__VA_ARGS__) #define exit() \ - sys0(SYS_EXIT); \ - while (1) { \ + { \ + sys0(SYS_EXIT); \ + while (1) { \ + } \ } #endif |