BarryServer : Git

All the code for all my projects
// BarryServer : Git / OrionLibC / commit / 03048a95d88cc7a78171393371f5c22a0250a014 / unistd / clone.c

// Related

OrionLibC

Barry Importing existing Orion LibC 03048a9 (2 years, 2 months ago)
diff --git a/unistd/clone.c b/unistd/clone.c
new file mode 100644
index 0000000..f7f4b34
--- /dev/null
+++ b/unistd/clone.c
@@ -0,0 +1,13 @@
+#include <stddef.h>
+#include <sys/syscall.h>
+#include <sys/types.h>
+
+/* Fork the current process */
+pid_t
+clone(int flags)
+{
+	int ret;
+	asm volatile("int $0x80" : "=a" (ret) : "0" (SYSCALL_CLONE),
+	             "c" (1), "S" (&flags));
+	return ret;
+}