/kernel/trunk/core/memory.inc |
---|
1177,6 → 1177,7 |
mov eax, [current_slot] |
xchg ecx, [eax + APPDATA.exc_handler] |
xchg edx, [eax + APPDATA.except_mask] |
xchg esi, [eax + APPDATA.exc_reserve_stack] |
mov [esp + SYSCALL_STACK.ebx], edx |
mov [esp + SYSCALL_STACK.eax], ecx |
ret |
/kernel/trunk/core/sched.inc |
---|
307,6 → 307,13 |
mov [ebx + APPDATA.wait_param], eax ; retval for wait |
mov [ebx + APPDATA.state], TSTATE_RUNNING |
.task_found: |
mov dl, [ebx + APPDATA.def_priority] |
test dl, dl |
jz .no_local_priority |
dec [ebx + APPDATA.cur_priority] |
jnz .task_next |
xchg [ebx + APPDATA.cur_priority], dl |
.no_local_priority: |
mov [scheduler_current+ecx*4], ebx |
; If we have selected a thread with higher priority |
; AND rescheduling is due to IRQ, |
/kernel/trunk/core/sys32.inc |
---|
114,6 → 114,18 |
page_fault_exc: ; foolproof: selectors are clobbered ... |
pop [ss:pf_err_code] ; actually, until the next #PF |
cmp edi, CONTROL_EXCEPTION ; equ 'EXPT' |
jne .no_ctrl_exc |
bt dword [esp], 31 |
jc .setret |
test esi, esi |
jl .no_ctrl_exc |
.setret: |
mov [esp], esi |
iret |
.no_ctrl_exc: |
save_ring3_context |
mov bl, 14 |
211,8 → 223,7 |
add ecx, 1000h |
jl .nostack |
.ex_stack: |
xor ecx, ecx |
mov ecx, [ecx+APP_HEADER_01_.except_stack_top] |
mov ecx, [esi+APPDATA.exc_reserve_stack] |
test ecx, ecx |
jle .nostack |
xchg edi, eax |
/kernel/trunk/core/taskman.inc |
---|
28,7 → 28,6 |
stack_top dd ? ;+24 |
i_param dd ? ;+28 |
i_icon dd ? ;+32 |
except_stack_top dd ? ;+36 |
ends |
struct APP_HDR |
1009,6 → 1008,7 |
;set draw data to full screen |
xor eax, eax |
mov [SLOT_BASE + ebx + APPDATA.def_priority], al |
mov [ecx + WDATA.draw_data.left], eax |
mov [ecx + WDATA.draw_data.top], eax |
mov eax, [screen_workarea.right] |