about summary refs log tree commit diff stats
path: root/401sleep.mu
diff options
context:
space:
mode:
Diffstat (limited to '401sleep.mu')
-rw-r--r--401sleep.mu21
1 files changed, 0 insertions, 21 deletions
diff --git a/401sleep.mu b/401sleep.mu
deleted file mode 100644
index 79ad6bd5..00000000
--- a/401sleep.mu
+++ /dev/null
@@ -1,21 +0,0 @@
-type timespec {
-  tv_sec: int
-  tv_nsec: int
-}
-
-# prototype wrapper around syscall_nanosleep
-# nsecs must be less than 999999999 or 0x3b9ac9ff nanoseconds
-fn sleep secs: int, nsecs: int {
-  var t: timespec
-  # initialize t
-  var tmp/eax: (addr int) <- get t, tv_sec
-  var tmp2/ecx: int <- copy secs
-  copy-to *tmp, tmp2
-  tmp <- get t, tv_nsec
-  tmp2 <- copy nsecs
-  copy-to *tmp, tmp2
-  # perform the syscall
-  var t-addr/ebx: (addr timespec) <- address t
-  var rem-addr/ecx: (addr timespec) <- copy 0
-  syscall_nanosleep
-}