summaryrefslogtreecommitdiff
path: root/lib/thread
diff options
context:
space:
mode:
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"
+}