aboutsummaryrefslogtreecommitdiff
path: root/system/x86_64/syscalls.h
diff options
context:
space:
mode:
authorKlaatu <[email protected]>2015-05-17 15:33:21 +1200
committerKlaatu <[email protected]>2015-05-17 15:33:21 +1200
commitb0de699679e8f1e39af847ed172d1ba605b4370c (patch)
tree01dac00471d61f727394e508c613b29cff0ceae5 /system/x86_64/syscalls.h
bulk upload of source
Diffstat (limited to 'system/x86_64/syscalls.h')
-rw-r--r--system/x86_64/syscalls.h20
1 files changed, 20 insertions, 0 deletions
diff --git a/system/x86_64/syscalls.h b/system/x86_64/syscalls.h
new file mode 100644
index 0000000..b4f1476
--- /dev/null
+++ b/system/x86_64/syscalls.h
@@ -0,0 +1,20 @@
+#include <asm/unistd.h>
+
+#define syscall_weak(name,wsym,sym) \
+.text; \
+.type wsym,@function; \
+.weak wsym; \
+wsym: ; \
+.type sym,@function; \
+.global sym; \
+sym: \
+ mov $__NR_##name,%al; \
+ jmp __unified_syscall
+
+#define syscall(name,sym) \
+.text; \
+.type sym,@function; \
+.global sym; \
+sym: \
+ mov $__NR_##name,%al; \
+ jmp __unified_syscall