Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(389)

Unified Diff: fusl/src/linux/clone.c

Issue 1573973002: Add a "fork" of musl as //fusl. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 4 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « fusl/src/linux/clock_adjtime.c ('k') | fusl/src/linux/epoll.c » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: fusl/src/linux/clone.c
diff --git a/fusl/src/linux/clone.c b/fusl/src/linux/clone.c
new file mode 100644
index 0000000000000000000000000000000000000000..b9e5594530474c069a8559c009d2d5f5086b8908
--- /dev/null
+++ b/fusl/src/linux/clone.c
@@ -0,0 +1,19 @@
+#include <stdarg.h>
+#include <unistd.h>
+#include "pthread_impl.h"
+#include "syscall.h"
+
+int clone(int (*func)(void *), void *stack, int flags, void *arg, ...)
+{
+ va_list ap;
+ pid_t *ptid, *ctid;
+ void *tls;
+
+ va_start(ap, arg);
+ ptid = va_arg(ap, pid_t *);
+ tls = va_arg(ap, void *);
+ ctid = va_arg(ap, pid_t *);
+ va_end(ap);
+
+ return __syscall_ret(__clone(func, stack, flags, arg, ptid, tls, ctid));
+}
« no previous file with comments | « fusl/src/linux/clock_adjtime.c ('k') | fusl/src/linux/epoll.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698