summaryrefslogtreecommitdiff
path: root/userspace/sys/syscalls.c
diff options
context:
space:
mode:
Diffstat (limited to 'userspace/sys/syscalls.c')
-rw-r--r--userspace/sys/syscalls.c6
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));