1: /*
   2:  * Copyright (c) 1983 Regents of the University of California.
   3:  * All rights reserved.  The Berkeley software License Agreement
   4:  * specifies the terms and conditions for redistribution.
   5:  */
   6: 
   7: #ifdef SYSLIBC_SCCS
   8: _sccsid:.asciz  "@(#)wait3.c	5.3 (Berkeley) 3/9/86"
   9: #endif SYSLIBC_SCCS
  10: 
  11: /*	@(#)wait3.c	5.3	(Berkeley)	3/9/86	*/
  12: 
  13: /*
  14:  * C library -- wait3
  15:  *
  16:  * pid = wait3(&status, flags, &rusage);
  17:  *
  18:  * pid == -1 if error
  19:  * status indicates fate of process, if given
  20:  * flags may indicate process is not to hang or
  21:  * that untraced stopped children are to be reported.
  22:  * rusage optionally returns detailed resource usage information
  23:  */
  24: #include "SYS.h"
  25: 
  26: #define SYS_wait3   SYS_wait
  27: 
  28: ENTRY(wait3)
  29:     movl    8(ap),r0    /* make it easy for system to get */
  30:     movl    12(ap),r1   /* these extra arguments */
  31:     bispsw  $0xf        /* flags wait3() */
  32:     chmk    $SYS_wait3
  33:     bcc     noerror
  34:     movl    r0,_errno
  35:     mnegl   $1,r0
  36:     ret
  37: noerror:
  38:     tstl    4(ap)       /* status desired? */
  39:     beql    nostatus    /* no */
  40:     movl    r1,*4(ap)   /* store child's status */
  41: nostatus:
  42:     ret

Defined functions

ENTRY defined in line 8; never used

Defined macros

SYS_wait3 defined in line 26; never used
Last modified: 1986-03-10
Generated: 2016-12-26
Generated by src2html V0.67
page hit count: 654
Valid CSS Valid XHTML 1.0 Strict