ref: db34187dc25f6b3f1a85b85c4dcf9a69b1cb4d54
parent: ac58fd9b83d1bb1cac2a0fb354176dd975afd94c
author: Ori Bernstein <ori@eigenstate.org>
date: Sat Jan 12 18:27:46 EST 2019
Fix thread spawning on OSX 10.14
--- a/lib/sys/sys+osx-x64.myr
+++ b/lib/sys/sys+osx-x64.myr
@@ -888,7 +888,7 @@
}
const bsdthread_create = {func , arg , stk , pthr , flags
- -> (syscall(Sysbsdthread_create, a(func), a(arg), a(stk), a(pthr)) : void#)
+ -> (syscall(Sysbsdthread_create, a(func), a(arg), a(stk), a(pthr), a(flags)) : void#)
}
const bsdthread_terminate = {stk , len , port , sem
--- a/lib/thread/spawn+osx.myr
+++ b/lib/thread/spawn+osx.myr
@@ -45,10 +45,10 @@
ret = sys.bsdthread_create( \
(tramp : void#), \ /* start */
- (tos : void#), \ /* arg */
- (tos : void#), \ /* stack */
- (0 : void#), \ /* pthread struct */
- 0x01000000) /* flags (PTHREAD_START_CUSTOM): don't alloc stack in kernel */
+ (tos : void#), \ /* arg */
+ (tos : void#), \ /* stack */
+ (0 : void#), \ /* pthread struct */
+ 0x01000000) /* flags (PTHREAD_START_CUSTOM): don't alloc stack in kernel */
if (ret : std.size) < 0
sys.munmap(stk, sz)