home *** CD-ROM | disk | FTP | other *** search
- IDNestCnt = 302
- AttnResched = 306
- TDNestCnt = 303
- Switch = -30
-
- .text
- .align 16
- .globl Exec_Permit
- .type Exec_Permit,@function
- Exec_Permit:
- /* Preserve all registers */
- pushl %edx
- pushl %eax
-
- /* Get SysBase */
- movl 12(%esp),%edx
-
- /* Decrement and test TDNestCnt */
- decl TDNestCnt(%edx)
- jge noswch
-
- /* Is the a delayed switch pending and are taskswitches allowed? */
- cmpb $0,AttnResched(%edx)
- jge noswch
- cmpb $0,IDNestCnt(%edx)
- jge noswch
-
- /* Clear delayed switch bit and do the delayed switch */
- andb $127,AttnResched(%edx)
- leal Switch(%edx),%eax
- pushl %edx
- call *%eax
- addl $4,%esp
-
- /* Restore registers and return */
- noswch: popl %eax
- popl %edx
- ret
-