diff options
| author | Miguel <m.i@gmx.at> | 2018-08-17 02:28:02 +0200 |
|---|---|---|
| committer | Miguel <m.i@gmx.at> | 2018-08-17 02:28:02 +0200 |
| commit | c742be9c738c91703a7be787639cad167de3a6b1 (patch) | |
| tree | db0e170dab1b7f34630489d0cb1d396c92f15c79 /userspace/sys/syscalls.c | |
| parent | 559eea53ecdd1e3e45f24d15e8739419b0cd647a (diff) | |
started reviving my fool os
Diffstat (limited to 'userspace/sys/syscalls.c')
| -rw-r--r-- | userspace/sys/syscalls.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/userspace/sys/syscalls.c b/userspace/sys/syscalls.c index c3ff909..10e035c 100644 --- a/userspace/sys/syscalls.c +++ b/userspace/sys/syscalls.c @@ -4,16 +4,16 @@ extern char **environ; //struct _reent *_impure_ptr; // generic syscall interface! -int syscall(int call, int p1, int p2, int p3) + +int __attribute__ ((noinline)) syscall(int call, int p1, int p2, int p3) { int ebx; // will hold return value; + // select syscall and pass params asm("pusha"); - // select syscall asm("mov %0, %%eax"::"m"(call)); - // pass params asm("mov %0,%%edx"::"m"(p1)); asm("mov %0,%%ecx"::"m"(p2)); asm("mov %0,%%ebx"::"m"(p3)); |
