From: Roland McGrath Date: Fri, 21 May 1993 18:24:40 +0000 (+0000) Subject: Formerly unix/sysv/sco3.2.4/__waitpid.S.~2~ X-Git-Tag: glibc-2.16-ports-before-merge~4268 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=d5d34291df29ed133f9225b20b1a325b434f6e44;p=thirdparty%2Fglibc.git Formerly unix/sysv/sco3.2.4/__waitpid.S.~2~ --- diff --git a/sysdeps/unix/sysv/sco3.2.4/waitpid.S b/sysdeps/unix/sysv/sco3.2.4/waitpid.S index 73e0888f0f1..be6c19b03e8 100644 --- a/sysdeps/unix/sysv/sco3.2.4/waitpid.S +++ b/sysdeps/unix/sysv/sco3.2.4/waitpid.S @@ -18,5 +18,17 @@ Cambridge, MA 02139, USA. */ #include -SYSCALL__ (waitpid, 3) - ret +ENTRY (__waitpid) + /* The `waitpid' system call is distinguished from plain + `wait' by setting lots of bits in the processor flags. */ + pushfl /* Push the flags word. */ + popl %eax /* Pop it into the accumulator. */ + orl $0x8c4, %eax /* Set lots of bits. */ + pushl $eax /* Push the new flags word. */ + popfl /* Pop it into the flags. */ + DO_CALL (wait, 2) + movl 4(%esp), scratch /* Put status pointer in scratch register. */ + testl scratch, scratch /* Is it non-nil? */ + je null + movl r1, (scratch) /* Yes; store the status there. */ +null: ret