Annotation of researchv9/libc/nsys/wait.s, revision 1.1.1.1

1.1       root        1: # C library -- wait
                      2: 
                      3: # pid = wait(0);
                      4: #   or,
                      5: # pid = wait(&status);
                      6: #
                      7: # pid == -1 if error
                      8: # status indicates fate of process, if given
                      9: 
                     10:        wait = 7
                     11: .globl _wait
                     12: .globl  cerror
                     13: 
                     14: _wait:
                     15:        linkw   a6,#0
                     16:        pea     wait
                     17:        trap    #0
                     18:        bcc     noerror
                     19:        jmp     cerror
                     20: noerror:
                     21:        tstl    sp@(8)          | status desired?
                     22:        beql    nostatus        | no
                     23:        movl    sp@(8),a0
                     24:        movl    d1,a0@          | store child's status
                     25: nostatus:
                     26:        unlk    a6
                     27:        rts

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.