summaryrefslogtreecommitdiff
path: root/lib/thread
diff options
context:
space:
mode:
authorOri Bernstein <ori@eigenstate.org>2017-07-21 23:07:42 -0700
committerOri Bernstein <ori@eigenstate.org>2017-07-22 22:09:36 -0700
commita3684bcdf61e987bc4dc83bdcc5a881566bece78 (patch)
treea3a71cae95b8fc8e5cd79d7cfaf7e0bad99ee98e /lib/thread
parent6a9dbb951669f51e106423bd4a3b8f5b532bfc0f (diff)
downloadmc-a3684bcdf61e987bc4dc83bdcc5a881566bece78.tar.gz
Using implicit util files in tests is a bad idea.
Also, it's going to go away in the new mbld.
Diffstat (limited to 'lib/thread')
-rw-r--r--lib/thread/bld.sub4
-rw-r--r--lib/thread/test/atomic.myr4
-rw-r--r--lib/thread/test/mutex.myr4
-rw-r--r--lib/thread/util.myr (renamed from lib/thread/test/util.myr)2
4 files changed, 9 insertions, 5 deletions
diff --git a/lib/thread/bld.sub b/lib/thread/bld.sub
index 8f892f1..9d69ecd 100644
--- a/lib/thread/bld.sub
+++ b/lib/thread/bld.sub
@@ -45,3 +45,7 @@ lib thread =
lib ../sys:sys
lib ../std:std
;;
+
+lib testutil =
+ util.myr
+;;
diff --git a/lib/thread/test/atomic.myr b/lib/thread/test/atomic.myr
index 3dd3284..4676543 100644
--- a/lib/thread/test/atomic.myr
+++ b/lib/thread/test/atomic.myr
@@ -1,7 +1,7 @@
use std
use thread
-use "util"
+use testutil
const Nherd = 20
@@ -11,7 +11,7 @@ var done : uint32 = 0
const main = {
done = 0
val = 0
- mkherd(Nherd, incvar)
+ testutil.mkherd(Nherd, incvar)
while thread.xget(&done) != Nherd
/* nothing */
;;
diff --git a/lib/thread/test/mutex.myr b/lib/thread/test/mutex.myr
index b366637..f21ce91 100644
--- a/lib/thread/test/mutex.myr
+++ b/lib/thread/test/mutex.myr
@@ -1,7 +1,7 @@
use std
use thread
-use "util"
+use testutil
const Nherd = 20
@@ -14,7 +14,7 @@ const main = {
val = 0
mtx = thread.mkmtx()
- mkherd(Nherd, incvar)
+ testutil.mkherd(Nherd, incvar)
while thread.xget(&done) != Nherd
/* nothing */
;;
diff --git a/lib/thread/test/util.myr b/lib/thread/util.myr
index 610a095..a29d52d 100644
--- a/lib/thread/test/util.myr
+++ b/lib/thread/util.myr
@@ -1,7 +1,7 @@
use std
use thread
-pkg =
+pkg testutil =
const mkherd : (n : uint32, fn : (-> void) ->void)
;;