summaryrefslogtreecommitdiff
path: root/userspace/newcalls.h
diff options
context:
space:
mode:
Diffstat (limited to 'userspace/newcalls.h')
-rw-r--r--userspace/newcalls.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/userspace/newcalls.h b/userspace/newcalls.h
index 9bc55a5..4568711 100644
--- a/userspace/newcalls.h
+++ b/userspace/newcalls.h
@@ -3,6 +3,7 @@
// this syscall will be moved to newlib later!
#define SYSCALL_CLONE 83
#define SYSCALL_PIPE 84
+#define SYSCALL_DUP2 86
int _clone(void)
{
@@ -12,4 +13,8 @@ int _pipe(uint32_t fds[2])
{
return syscall(SYSCALL_PIPE,fds,0,0);
}
+int _dup2(uint32_t oldfd,uint32_t newfd)
+{
+ return syscall(SYSCALL_DUP2,oldfd,newfd,0);
+}
//