authorgravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2018-04-29 22:31:42-04:00
committergravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2018-04-29 22:31:42-04:00
log39befc35a851f6cf206c7e3b19d66f7df00440b0
treeaedd2a4b8888ede511469407205c29ff1434bd3f
parent4e23fb7f062322e604d74ebb7e62d707ecf7e7b6

update comment in std/os/index.zig


1 files changed, 2 insertions(+), 2 deletions(-)

std/os/index.zig+2-2
...@@ -2546,9 +2546,9 @@ pub fn spawnThread(context: var, comptime startFn: var) SpawnThreadError!&Thread...@@ -2546,9 +2546,9 @@ pub fn spawnThread(context: var, comptime startFn: var) SpawnThreadError!&Thread
2546 else => return unexpectedErrorPosix(usize(err)),2546 else => return unexpectedErrorPosix(usize(err)),
2547 }2547 }
2548 } else if (builtin.os == builtin.Os.linux) {2548 } else if (builtin.os == builtin.Os.linux) {
2549 // use linux API directly2549 // use linux API directly. TODO use posix.CLONE_SETTLS and initialize thread local storage correctly
2550 const flags = posix.CLONE_VM | posix.CLONE_FS | posix.CLONE_FILES | posix.CLONE_SIGHAND2550 const flags = posix.CLONE_VM | posix.CLONE_FS | posix.CLONE_FILES | posix.CLONE_SIGHAND
2551 | posix.CLONE_THREAD | posix.CLONE_SYSVSEM // | posix.CLONE_SETTLS2551 | posix.CLONE_THREAD | posix.CLONE_SYSVSEM
2552 | posix.CLONE_PARENT_SETTID | posix.CLONE_CHILD_CLEARTID | posix.CLONE_DETACHED;2552 | posix.CLONE_PARENT_SETTID | posix.CLONE_CHILD_CLEARTID | posix.CLONE_DETACHED;
2553 const newtls: usize = 0;2553 const newtls: usize = 0;
2554 const rc = posix.clone(MainFuncs.linuxThreadMain, stack_end, flags, arg, &thread_ptr.data.pid, newtls, &thread_ptr.data.pid);2554 const rc = posix.clone(MainFuncs.linuxThreadMain, stack_end, flags, arg, &thread_ptr.data.pid, newtls, &thread_ptr.data.pid);