Implement clone() C library function properly.

Only provide an implementation for ARM at the moment, since
it requires specific assembly fragments (the standard syscall
stubs cannot be used because the child returns in a different
stack).
This commit is contained in:
David 'Digit' Turner
2010-01-22 18:59:05 -08:00
parent 1a2917ca95
commit 97cf7f3394
15 changed files with 213 additions and 52 deletions

View File

@@ -69,8 +69,9 @@ extern int sched_rr_get_interval(pid_t pid, struct timespec *tp);
#define CLONE_CHILD_SETTID 0x01000000
#define CLONE_STOPPED 0x02000000
extern int clone(int (*fn)(void*), void *child_stack, int flags, void *arg);
extern pid_t __clone(int, void *);
#ifdef __GNU_SOURCE
extern int clone(int (*fn)(void *), void *child_stack, int flags, void* arg, ...);
#endif
__END_DECLS