Verified Commit 66615ef4 authored by Jeremy Soller's avatar Jeremy Soller
Browse files

Use CLONE_THREAD for linux pte_clone

parent 6b46704a
Pipeline #9826 failed with stages
in 19 seconds
...@@ -30,6 +30,7 @@ const CLONE_VM: usize = 0x0100; ...@@ -30,6 +30,7 @@ const CLONE_VM: usize = 0x0100;
const CLONE_FS: usize = 0x0200; const CLONE_FS: usize = 0x0200;
const CLONE_FILES: usize = 0x0400; const CLONE_FILES: usize = 0x0400;
const CLONE_SIGHAND: usize = 0x0800; const CLONE_SIGHAND: usize = 0x0800;
const CLONE_THREAD: usize = 0x00010000;
#[repr(C)] #[repr(C)]
#[derive(Default)] #[derive(Default)]
...@@ -340,7 +341,7 @@ impl Pal for Sys { ...@@ -340,7 +341,7 @@ impl Pal for Sys {
#[cfg(target_arch = "x86_64")] #[cfg(target_arch = "x86_64")]
unsafe fn pte_clone(stack: *mut usize) -> pid_t { unsafe fn pte_clone(stack: *mut usize) -> pid_t {
let flags = CLONE_VM | CLONE_FS | CLONE_FILES | CLONE_SIGHAND; let flags = CLONE_VM | CLONE_FS | CLONE_FILES | CLONE_SIGHAND | CLONE_THREAD;
let pid; let pid;
llvm_asm!(" llvm_asm!("
# Call clone syscall # Call clone syscall
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment