diff options
Diffstat (limited to 'src/linux/clone.c')
-rw-r--r-- | src/linux/clone.c | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/src/linux/clone.c b/src/linux/clone.c new file mode 100644 index 00000000..b9e55945 --- /dev/null +++ b/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)); +} |