summaryrefslogtreecommitdiffstats
path: root/arch/um/include/sysdep-x86_64/stub.h
diff options
context:
space:
mode:
Diffstat (limited to 'arch/um/include/sysdep-x86_64/stub.h')
-rw-r--r--arch/um/include/sysdep-x86_64/stub.h12
1 files changed, 11 insertions, 1 deletions
diff --git a/arch/um/include/sysdep-x86_64/stub.h b/arch/um/include/sysdep-x86_64/stub.h
index 2bd6e7a97286..c41689c13dc9 100644
--- a/arch/um/include/sysdep-x86_64/stub.h
+++ b/arch/um/include/sysdep-x86_64/stub.h
@@ -6,7 +6,6 @@
#ifndef __SYSDEP_STUB_H
#define __SYSDEP_STUB_H
-#include <asm/ptrace.h>
#include <asm/unistd.h>
#include <sysdep/ptrace_user.h>
@@ -20,6 +19,17 @@ extern void stub_clone_handler(void);
#define __syscall_clobber "r11","rcx","memory"
#define __syscall "syscall"
+static inline long stub_syscall0(long syscall)
+{
+ long ret;
+
+ __asm__ volatile (__syscall
+ : "=a" (ret)
+ : "0" (syscall) : __syscall_clobber );
+
+ return ret;
+}
+
static inline long stub_syscall2(long syscall, long arg1, long arg2)
{
long ret;
OpenPOWER on IntegriCloud