summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOri Bernstein <ori@eigenstate.org>2017-07-25 14:19:07 -0700
committerOri Bernstein <ori@eigenstate.org>2017-07-25 15:09:21 -0700
commit627499d53f3a298e71d3ed0d8586a41b5097dfdd (patch)
treec137b262aad0f1424b43db6f128a574d946c0334
parent19916661f0bfc2ada63021dbba8cb5763d9565d4 (diff)
downloadmc-627499d53f3a298e71d3ed0d8586a41b5097dfdd.tar.gz
Stub in NetBSD thread spawn
-rw-r--r--lib/thread/bld.sub2
-rw-r--r--lib/thread/spawn+netbsd.myr13
-rwxr-xr-xmk/bootstrap/bootstrap+NetBSD-amd64.sh1
3 files changed, 14 insertions, 2 deletions
diff --git a/lib/thread/bld.sub b/lib/thread/bld.sub
index b1510a5..aef5016 100644
--- a/lib/thread/bld.sub
+++ b/lib/thread/bld.sub
@@ -22,7 +22,7 @@ lib thread =
# netbsd impl of thread primitives
#condvar+netbsd.myr
#mutex+netbsd.myr
- #spawn+netbsd.myr
+ spawn+netbsd.myr
#ncpu+netbsd.myr
#exit+netbsd-x64.s
diff --git a/lib/thread/spawn+netbsd.myr b/lib/thread/spawn+netbsd.myr
new file mode 100644
index 0000000..17a8d40
--- /dev/null
+++ b/lib/thread/spawn+netbsd.myr
@@ -0,0 +1,13 @@
+use std
+
+pkg thread =
+ type tid = uint64
+
+ const spawn : (fn : (-> void) -> std.result(tid, byte[:]))
+;;
+
+const spawn = {fn
+ std.die("unimplemented\n")
+ -> `std.Err "fuck"
+}
+
diff --git a/mk/bootstrap/bootstrap+NetBSD-amd64.sh b/mk/bootstrap/bootstrap+NetBSD-amd64.sh
index 1772f5a..c51a73a 100755
--- a/mk/bootstrap/bootstrap+NetBSD-amd64.sh
+++ b/mk/bootstrap/bootstrap+NetBSD-amd64.sh
@@ -7,7 +7,6 @@ echo as -g -o util.o util+posixy-x64.s && as -g -o util.o util+posixy-x64.s
echo $pwd/6/6m syserrno+netbsd.myr && $pwd/6/6m syserrno+netbsd.myr &&\
echo $pwd/6/6m systypes.myr && $pwd/6/6m systypes.myr &&\
echo $pwd/6/6m sys+netbsd-x64.myr && $pwd/6/6m sys+netbsd-x64.myr &&\
-echo $pwd/6/6m setup+posixy.myr && $pwd/6/6m setup+posixy.myr &&\
echo as -g -o syscall.o syscall+netbsd-x64.s && as -g -o syscall.o syscall+netbsd-x64.s &&\
echo $pwd/6/6m ifreq+netbsd.myr && $pwd/6/6m ifreq+netbsd.myr &&\
echo $pwd/muse/muse -o libsys.use -p sys ifreq.use setup.use syserrno.use systypes.use sys.use && $pwd/muse/muse -o libsys.use -p sys ifreq.use setup.use syserrno.use systypes.use sys.use &&\