1*9988Ssam/* @(#)wait3.s 4.2 (Berkeley) 12/28/82 */ 29987Ssam 39987Ssam/* 49987Ssam * C library -- wait3 59987Ssam * 69987Ssam * pid = wait3(&status, flags, &rusage); 79987Ssam * 89987Ssam * pid == -1 if error 99987Ssam * status indicates fate of process, if given 109987Ssam * flags may indicate process is not to hang or 119987Ssam * that untraced stopped children are to be reported. 129987Ssam * rusage optionally returns detailed resource usage information 139987Ssam */ 149987Ssam#include "SYS.h" 159987Ssam 169987Ssam#define SYS_wait3 SYS_wait 179987Ssam 18*9988SsamENTRY(wait3) 199987Ssam movl 8(ap),r0 /* make it easy for system to get */ 209987Ssam movl 12(ap),r1 /* these extra arguments */ 219987Ssam bispsw $0xf /* flags wait3() */ 229987Ssam chmk $SYS_wait3 239987Ssam bcc noerror 249987Ssam movl r0,_errno 259987Ssam mnegl $1,r0 269987Ssam ret 279987Ssamnoerror: 289987Ssam tstl 4(ap) /* status desired? */ 299987Ssam beql nostatus /* no */ 309987Ssam movl r1,*4(ap) /* store child's status */ 319987Ssamnostatus: 329987Ssam ret 33