|
@@ -713,33 +713,6 @@ index 89fda5e..f6963f6 100644
|
|
|
movl %fs:CANCELHANDLING, %eax
|
|
|
jmp 3b
|
|
|
END(__pthread_disable_asynccancel)
|
|
|
-diff --git a/nptl/sysdeps/unix/sysv/linux/x86_64/fork.c b/nptl/sysdeps/unix/sysv/linux/x86_64/fork.c
|
|
|
-index a036b92..40a1eaf 100644
|
|
|
---- a/nptl/sysdeps/unix/sysv/linux/x86_64/fork.c
|
|
|
-+++ b/nptl/sysdeps/unix/sysv/linux/x86_64/fork.c
|
|
|
-@@ -21,10 +21,20 @@
|
|
|
- #include <sysdep.h>
|
|
|
- #include <tls.h>
|
|
|
-
|
|
|
--
|
|
|
--#define ARCH_FORK() \
|
|
|
-+/* In Graphene, we prefer to call fork system call directly than clone */
|
|
|
-+#if USE_clone_FOR_fork
|
|
|
-+# define ARCH_FORK() \
|
|
|
- INLINE_SYSCALL (clone, 4, \
|
|
|
- CLONE_CHILD_SETTID | CLONE_CHILD_CLEARTID | SIGCHLD, 0, \
|
|
|
- NULL, &THREAD_SELF->tid)
|
|
|
-+#else
|
|
|
-+# define ARCH_FORK() \
|
|
|
-+ ({ unsigned long ret = INLINE_SYSCALL (fork, 0); \
|
|
|
-+ if (!ret) { \
|
|
|
-+ pid_t pid = INLINE_SYSCALL (getpid, 0); \
|
|
|
-+ THREAD_SETMEM (THREAD_SELF, pid, pid); \
|
|
|
-+ THREAD_SETMEM (THREAD_SELF, tid, pid); \
|
|
|
-+ } ret; })
|
|
|
-+#endif
|
|
|
-
|
|
|
- #include "../fork.c"
|
|
|
diff --git a/nptl/sysdeps/unix/sysv/linux/x86_64/lowlevellock.S b/nptl/sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
|
|
|
index f2dca07..0ce7c67 100644
|
|
|
--- a/nptl/sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
|