From b7f1777a709e575cb6aa03c25a976d06d36cb6a6 Mon Sep 17 00:00:00 2001 From: Keith Randall Date: Mon, 23 Apr 2018 07:30:32 -0700 Subject: runtime,cmd/ld: on darwin, create theads using libc Replace thread creation with calls to the pthread library in libc. Update #17490 Change-Id: I1e19965c45255deb849b059231252fc6a7861d6c Reviewed-on: https://go-review.googlesource.com/108679 Run-TryBot: Keith Randall TryBot-Result: Gobot Gobot Reviewed-by: Ian Lance Taylor --- src/runtime/os_linux.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/runtime/os_linux.go') diff --git a/src/runtime/os_linux.go b/src/runtime/os_linux.go index 265cafdf9b..a4992343b5 100644 --- a/src/runtime/os_linux.go +++ b/src/runtime/os_linux.go @@ -142,7 +142,8 @@ func clone(flags int32, stk, mp, gp, fn unsafe.Pointer) int32 // May run with m.p==nil, so write barriers are not allowed. //go:nowritebarrier -func newosproc(mp *m, stk unsafe.Pointer) { +func newosproc(mp *m) { + stk := unsafe.Pointer(mp.g0.stack.hi) /* * note: strace gets confused if we use CLONE_PTRACE here. */ -- cgit v1.3