-
-Entry(hndl_diag_scall)
- TIME_TRAP_UENTRY
-
- movq %gs:CPU_KERNEL_STACK,%rdi
- xchgq %rdi,%rsp /* switch to kernel stack */
-
- /* Check for active vtimers in the current task */
- movq %gs:CPU_ACTIVE_THREAD,%rcx /* get current thread */
- movq TH_TASK(%rcx),%rbx /* point to current task */
- TASK_VTIMER_CHECK(%rbx,%rcx)
-
- pushq %rdi /* push pcb stack */
-
- CCALL(diagCall) // Call diagnostics
-
- cli // Disable interruptions just in case
- cmpl $0,%eax // What kind of return is this?
- je 1f // - branch if bad (zero)
- popq %rsp // Get back the pcb stack
- jmp EXT(return_to_user) // Normal return, do not check asts...
-1:
- CCALL3(i386_exception, $EXC_SYSCALL, $0x6000, $1)
- // pass what would be the diag syscall
- // error return - cause an exception
- /* no return */
-
-