summaryrefslogtreecommitdiff
path: root/lib/thread
diff options
context:
space:
mode:
authorOri Bernstein <ori@eigenstate.org>2018-06-09 13:47:28 -0700
committerOri Bernstein <ori@eigenstate.org>2018-06-09 13:47:28 -0700
commit84393ead97a2e189b6057420ad7d94170b9aa00f (patch)
tree0356c0bc422713adde510745645d652aa867944f /lib/thread
parent92840bc1ade4d670ce1b6cd3dc7be48b16148a5e (diff)
downloadmc-84393ead97a2e189b6057420ad7d94170b9aa00f.tar.gz
Consistently and corretly add Oundef.
Diffstat (limited to 'lib/thread')
-rw-r--r--lib/thread/spawn+openbsd.myr9
1 files changed, 5 insertions, 4 deletions
diff --git a/lib/thread/spawn+openbsd.myr b/lib/thread/spawn+openbsd.myr
index a72e752..4526520 100644
--- a/lib/thread/spawn+openbsd.myr
+++ b/lib/thread/spawn+openbsd.myr
@@ -51,10 +51,11 @@ const spawnstk = {fn, sz
.tid = &ret,
.stk = (tos : byte#),
]
- if sys.__tfork_thread(&tfp, \
- sizeof(sys.tforkparams), \
- (startthread : void#), \
- (0 : void#)) < 0
+ ret = sys.__tfork_thread(&tfp,
+ sizeof(sys.tforkparams),
+ (startthread : void#),
+ (0 : void#))
+ if ret < 0
-> `std.Err "couldn't spawn thread"
;;
-> `std.Ok (ret : tid)