summaryrefslogtreecommitdiff
path: root/lib/thread
diff options
context:
space:
mode:
authorOri Bernstein <ori@eigenstate.org>2016-05-06 01:11:41 -0700
committerOri Bernstein <ori@eigenstate.org>2016-05-06 01:11:41 -0700
commitb332e98485d1c22cb93f3302b83ead9e004d5160 (patch)
tree37b55ff703787f201b22573a4d6e944aa355c983 /lib/thread
parent278b89b6962d2d81d280e4578a3481943a6ee79b (diff)
downloadmc-b332e98485d1c22cb93f3302b83ead9e004d5160.tar.gz
Yield in sched()
Diffstat (limited to 'lib/thread')
-rw-r--r--lib/thread/bld.sub3
-rw-r--r--lib/thread/mutex+freebsd.myr1
2 files changed, 4 insertions, 0 deletions
diff --git a/lib/thread/bld.sub b/lib/thread/bld.sub
index 73a07cc..378e17f 100644
--- a/lib/thread/bld.sub
+++ b/lib/thread/bld.sub
@@ -27,5 +27,8 @@ lib thread =
atomic-impl+x64.s
atomic.myr
+
+ lib ../sys:sys
+ lib ../std:std
;;
diff --git a/lib/thread/mutex+freebsd.myr b/lib/thread/mutex+freebsd.myr
index 8e4c10d..7ae2b15 100644
--- a/lib/thread/mutex+freebsd.myr
+++ b/lib/thread/mutex+freebsd.myr
@@ -37,6 +37,7 @@ const mtxlock = {mtx
if c == Unlocked
-> void
;;
+ sys.sched_yield()
;;
/*