1: /*	@(#)wait2.s	2.2	SCCS id keyword	*/
   2: / C library -- wait2
   3: 
   4: / pid = wait2(0,flags);
   5: /   or,
   6: / pid = wait2(&status,flags);
   7: /
   8: / pid == -1 if error
   9: / status indicates fate of process, if given
  10: / to be a syscall miser, we pass the second param
  11: / thru as bits in the ps (what a crock!)
  12: 
  13: .globl  _wait2
  14: .globl  cerror
  15: 
  16: _wait2:
  17:         mov     r5,-(sp)
  18:         mov     sp,r5
  19:         mov     6(r5),r0
  20:         sec|sev|sez|sen
  21:         sys     wait
  22:         bec     1f
  23:         jmp     cerror
  24: 1:
  25:         tst     4(r5)
  26:         beq     1f
  27:         mov     r1,*4(r5)       / status return
  28: 1:
  29:         mov     (sp)+,r5
  30:         rts     pc

Defined functions

_wait2 declared in line 13; defined in line 16; used 5 times
Last modified: 1981-10-20
Generated: 2016-12-26
Generated by src2html V0.67
page hit count: 580
Valid CSS Valid XHTML 1.0 Strict