|
|
1.1 ! root 1: # C library -- sigsys ! 2: ! 3: # sigsys(n, SIG_DFL); /* default action on signal(n) */ ! 4: # sigsys(n, SIG_HOLD); /* block signal temporarily */ ! 5: # sigsys(n, SIG_IGN); /* ignore signal(n) */ ! 6: # sigsys(n, label); /* goto label on signal(n) */ ! 7: # sigsys(n, DEFERSIG(label)); /* goto label with signal SIG_HOLD */ ! 8: ! 9: # returns old label, only one level. ! 10: ! 11: .set SIGDORTI,0x200 ! 12: ! 13: .set signal,48 ! 14: .globl _sigsys ! 15: .globl cerror ! 16: ! 17: .align 1 ! 18: _sigsys: ! 19: .word 0x0000 ! 20: chmk $signal ! 21: bcc noerror ! 22: jmp cerror ! 23: noerror: ! 24: ret ! 25: ! 26: # ! 27: # sigpeel(n, newact) ! 28: # ! 29: # when called from routine which was called by system, peels ! 30: # back frames to the last one, then calls the system to reenable ! 31: # the signal with newact, arranging to clean the stack before the ! 32: # signal can happen again ! 33: # ! 34: .globl _sigpeel ! 35: .align 1 ! 36: _sigpeel: ! 37: .word 0x0000 ! 38: .set RETOFF,16 # offset of return address in frame ! 39: # get signal number value to set ! 40: movl 4(ap),r0 ! 41: movl 8(ap),r1 ! 42: movab unw1,RETOFF(fp) ! 43: ret # peel off our frame ! 44: # top frame is now frame of routine signal action called ! 45: unw1: ! 46: movab unw2,RETOFF(fp) ! 47: ret ! 48: # now frame from callg of ``locore.s/sigcode()'' is gone ! 49: # if no value to set, can just ret now to go back to old code ! 50: # with an ret->rei, else must make the frame passed to us into a ! 51: # signal call frame by putting the new signal code in the ! 52: # second word, and call the kernel which will pop off the frame. ! 53: unw2: ! 54: tstl r1 ! 55: bneq unw3 ! 56: ret # easy ! 57: # mark dorti wanted, and reenable signal ! 58: unw3: ! 59: bisl3 $SIGDORTI,r0,4(ap) ! 60: ### movl r0,4(ap) ### for testing on old system ! 61: movl r1,8(ap) ! 62: chmk $signal ! 63: halt # can't happen ! 64: ! 65: ### for testing on old system ! 66: ### ret # and then rei, natch
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.