summaryrefslogtreecommitdiff
path: root/lib/thread
diff options
context:
space:
mode:
authorOri Bernstein <ori@eigenstate.org>2016-05-08 18:14:07 +1200
committerOri Bernstein <ori@eigenstate.org>2016-05-08 18:14:07 +1200
commit0060152b535f0376265f0fe46bba45964fe1a8b0 (patch)
treeaf48b33b8a414712fcb34f9169ff9db6ff2e9023 /lib/thread
parent4868e3b769c7b0d4c77c715df641219010be835b (diff)
downloadmc-0060152b535f0376265f0fe46bba45964fe1a8b0.tar.gz
We now can build and install on openbsd.
Diffstat (limited to 'lib/thread')
-rw-r--r--lib/thread/bld.sub4
-rw-r--r--lib/thread/spawn+openbsd.myr12
2 files changed, 16 insertions, 0 deletions
diff --git a/lib/thread/bld.sub b/lib/thread/bld.sub
index 378e17f..3d0ce27 100644
--- a/lib/thread/bld.sub
+++ b/lib/thread/bld.sub
@@ -25,6 +25,10 @@ lib thread =
spawn+plan9.myr
atomic-impl+plan9-x64.s
+ # openbsd impl of thread primitives
+ spawn+openbsd.myr
+
+
atomic-impl+x64.s
atomic.myr
diff --git a/lib/thread/spawn+openbsd.myr b/lib/thread/spawn+openbsd.myr
new file mode 100644
index 0000000..92cca94
--- /dev/null
+++ b/lib/thread/spawn+openbsd.myr
@@ -0,0 +1,12 @@
+use std
+
+pkg thread =
+ type tid = uint64
+
+ const spawn : (fn : (-> void) -> std.result(tid, byte[:]))
+;;
+
+const spawn = {fn;
+ std.die("threads not supported yet on openbsd\n")
+ -> `std.Fail "not supported"
+}