Update of /cvsroot/wisp/wisp/modules
In directory usw-pr-cvs1:/tmp/cvs-serv6776/modules
Modified Files:
linux.wrti
Log Message:
Implemented the |sys.waitpid| Worth word.
Index: linux.wrti
===================================================================
RCS file: /cvsroot/wisp/wisp/modules/linux.wrti,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -d -r1.14 -r1.15
--- linux.wrti 7 Sep 2002 21:51:45 -0000 1.14
+++ linux.wrti 7 Sep 2002 22:02:03 -0000 1.15
@@ -50,6 +50,13 @@
(macro sys.fork (conform) 2 \sys (believe %eax))
(macro sys.close (conform %ebx) 6 \sys (believe %eax))
+ ; |sys.waitpid| takes (pid options) and
+ ; returns (status pid) or (-errno) or (0)
+ (macro sys.waitpid (conform %ebx %edx) ,(sub %esp 4) ,(mov %ecx %esp)
+ 7 \sys (believe %eax)
+ dup 0 <= if ; no status?
+ nip
+ then)
(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))
@@ -250,6 +257,19 @@
(macro ENOMEDIUM 123) ; No medium found
(macro EMEDIUMTYPE 124) ; Wrong medium type
+
+ ; <bits/waitstatus.h> of glibc
+ (macro WEXITSTATUS 8 rshift #xFF and)
+ (macro WTERMSIG #x7F and)
+ (macro WSTOPSIG WEXITSTATUS)
+ (macro WIFEXITED WTERMSIG 0 =)
+ (macro WIFSTOPPED #xFF and #x7F =)
+ (macro WIFSIGNALED dup WIFSTOPPED 0 = swap WIFEXITED 0 = and)
+ (macro WCOREDUMP #x80 and 0 <>)
+
+ ; <linux/wait.h>
+ (macro WNOHANG 1)
+ (macro WUNTRACED 2)
; <linux/socket.h>
(macro AF_UNSPEC 0) (macro PF_UNSPEC 0)
|