Update of /cvsroot/wisp/wisp/modules
In directory usw-pr-cvs1:/tmp/cvs-serv29208/modules
Modified Files:
linux.wrti
Log Message:
Implemented |sys:sync| and dropped |sys:raw:accept|, |sys:raw:chdir|, |sys:raw:chmod|, |sys:raw:ftruncate|, |sys:raw:link|, |sys:raw:mkdir|, |sys:raw:pipe|, |sys:raw:rename|, |sys:raw:symlink|, |sys:raw:truncate|, and |sys:raw:unlink|.
Index: linux.wrti
===================================================================
RCS file: /cvsroot/wisp/wisp/modules/linux.wrti,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -d -r1.10 -r1.11
--- linux.wrti 4 Sep 2002 14:26:24 -0000 1.10
+++ linux.wrti 4 Sep 2002 14:28:27 -0000 1.11
@@ -35,9 +35,24 @@
,(add %esp 4)
(believe %eax))
+ ; |sys.pipe| returns ( reading-part writing-part ) or ( -errno )
+ (macro sys.pipe
+ (conform)
+ ,(sub %esp 8) ; allocate space for filedes[2]
+ ,(mov %ebx %esp)
+ 42 \sys (believe %eax)
+ dup 0 < if ; failed?
+ nip nip ; clean up
+ else
+ drop ; drop the result
+ swap ; account for downwards-growing stack
+ then)
+
(macro sys.fork (conform) 2 \sys (believe %eax))
(macro sys.close (conform %ebx) 6 \sys (believe %eax))
(macro sys.creat (conform %ebx %ecx) 8 \sys (believe %eax))
+ (macro sys.link (conform %ebx %ecx) 9 \sys (believe %eax))
+ (macro sys.unlink (conform %ebx) 10 \sys (believe %eax))
(macro sys.chdir (conform %ebx) 12 \sys (believe %eax))
; |sys.time| takes no argument and returns the time
(macro sys.time (conform) ,(mov %ebx 0) 13 \sys (believe %eax))
|