Linux debugging

Check our new training course

Linux debugging, tracing, profiling & perf. analysis

Check our new training course
with Creative Commons CC-BY-SA
lecture and lab materials

Bootlin logo

Elixir Cross Referencer

#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 *);

	return __syscall_ret(__clone(func, stack, flags, arg, ptid, tls, ctid));