diff options
author | Ori Bernstein <ori@eigenstate.org> | 2019-01-12 23:27:46 -0800 |
---|---|---|
committer | Ori Bernstein <ori@eigenstate.org> | 2019-01-12 23:27:46 -0800 |
commit | db34187dc25f6b3f1a85b85c4dcf9a69b1cb4d54 (patch) | |
tree | 682d6c0645fbae76c14e7120e4aad4c002c47786 | |
parent | ac58fd9b83d1bb1cac2a0fb354176dd975afd94c (diff) | |
download | mc-db34187dc25f6b3f1a85b85c4dcf9a69b1cb4d54.tar.gz |
Fix thread spawning on OSX 10.14
-rw-r--r-- | lib/sys/sys+osx-x64.myr | 2 | ||||
-rw-r--r-- | lib/thread/spawn+osx.myr | 8 |
2 files changed, 5 insertions, 5 deletions
diff --git a/lib/sys/sys+osx-x64.myr b/lib/sys/sys+osx-x64.myr index ba97c36..cee1a74 100644 --- a/lib/sys/sys+osx-x64.myr +++ b/lib/sys/sys+osx-x64.myr @@ -888,7 +888,7 @@ const bsdthread_register = {start, wqthread, sz, dummy, targetconc, queueoff } 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 diff --git a/lib/thread/spawn+osx.myr b/lib/thread/spawn+osx.myr index 1997df4..d3ad5fe 100644 --- a/lib/thread/spawn+osx.myr +++ b/lib/thread/spawn+osx.myr @@ -45,10 +45,10 @@ const spawnstk = {fn, sz 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) |