|
|
1.1 ! root 1: /* interrupt.s - disable, restore, enable */ ! 2: ! 3: #include <procreg.h> ! 4: ! 5: /*---------------------------------------------------------------------------- ! 6: * disable -- disable interrupts and save current IPL at argument address ! 7: *---------------------------------------------------------------------------- ! 8: * On entry, the stack contains (at AP+4) the address of a longword at ! 9: * which disable should save the current IPL. ! 10: * To call: PStype ps; disable(ps); ! 11: */ ! 12: .text /* text in subsegment 0 */ ! 13: .align 1 /* clr low bit of loc counter */ ! 14: .globl _disable /* external name */ ! 15: _disable: /* entry point for disable */ ! 16: .word 0x0 /* entry mask,save no registers */ ! 17: mfpr $IPL, *4(ap) /* store old IPL */ ! 18: mtpr $DISABLE, $IPL /* disable interrupts */ ! 19: ret ! 20: ! 21: /*---------------------------------------------------------------------------- ! 22: * restore -- restore interrupts to argument IPL ! 23: *---------------------------------------------------------------------------- ! 24: * On entry, the stack contains (at AP+4) the address of a longword ! 25: * containing the new IPL level. ! 26: * To call: PStype ps; restore(ps); ! 27: */ ! 28: .text ! 29: .align 1 ! 30: .globl _restore /* global procedure name */ ! 31: _restore: ! 32: .word 0x0 /* entry mask,no regs saved */ ! 33: mtpr *4(ap), $IPL /* restore IPL */ ! 34: ret ! 35: ! 36: /*---------------------------------------------------------------------------- ! 37: * enable -- enable interrupts ! 38: *---------------------------------------------------------------------------- ! 39: * To call: enable(); ! 40: */ ! 41: .text ! 42: .align 1 ! 43: .globl _enable /* global procedure name */ ! 44: _enable: ! 45: .word 0x0 /* entry mask,no regs saved */ ! 46: mtpr $ENABLE, $IPL /* enable interrupts */ ! 47: ret
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.