.previous
1:
- // check for the right thread state
+ // check for the right thread state
// (cancel and fpu_owner might also be set)
movl OFS__THREAD__STATE(%ebx), %edx
- andl $~(Thread_cancel | Thread_fpu_owner | Thread_alien | Thread_dis_alien), %edx
- cmpl $(Thread_ready), %edx
+ andl $~(VAL__Thread_cancel | VAL__Thread_fpu_owner | VAL__Thread_alien_or_vcpu_user | VAL__Thread_dis_alien | VAL__Thread_vcpu_state_mask), %edx
+ cmpl $(VAL__Thread_ready), %edx
jne 1f
.text 1
1: kdb_ke_asm("Before IRET: Wrong thread state")
.previous
1:
- // test if we are locked
- cmpl $0, OFS__THREAD__THREAD_LOCK__SWITCH_LOCK__LOCK_OWNER (%ebx)
- jne 1f
- .text 1
-1: kdb_ke_asm("Before IRET: Thread is locked")
- jmp 1f
- .previous
-1:
-
popl %edx
popl %ebx
2: