/kernel/trunk/core/sched.inc |
---|
40,6 → 40,7 |
mov ebx,[0x3000] |
xor esi,esi ;esi - should we change task? |
cmp [0xffff], byte 1 |
je .do_not_change_task |
65,11 → 66,20 |
mov [0x3000],ebx |
mov [0x3010],edi |
jmp @f |
.do_not_change_task: |
inc esi ;set don't change task flag |
@@: |
call _rdtsc |
mov [edi+0x18],eax |
cmp [0xffff],byte 0 |
je @f |
dec byte [0xffff] |
@@: |
shl ebx, 3 |
xor eax, eax |
add ebx, tss0 |
80,15 → 90,14 |
mov dx,0x20 |
out dx,al |
cmp [0xffff],byte 0 |
je .switch |
dec byte [0xffff] |
jmp @f |
test esi,esi ; skip jmp to TSS if we aren't going to switch tasks |
jnz @f |
.switch: |
inc [context_counter] ;noname & halyavin |
jmp pword [0xB000] |
inc [context_counter] ;noname & halyavin |
@@: |
pop es ds |
popad |
iret |
/kernel/trunk/core/sys32.inc |
---|
282,15 → 282,12 |
mov eax,[0x3000] |
shl eax,8 |
cmp [0x80000+eax+0xB0],byte 0 |
jz @f |
mov esi,system_error |
call sys_msg_board_str |
@@: |
jnz .system_error |
mov eax,[0x3000] |
imul eax,tss_step |
mov eax,[eax+tss_data+l.eip-tss_sceleton] |
.out_eip: |
mov [write_error_to],process_eip+43 |
call writehex |
305,12 → 302,21 |
ret |
.system_error: |
mov esi,system_error |
call sys_msg_board_str |
mov eax,[0x3000] |
shl eax,7 |
mov eax,[eax+0x298000+l.eip-tss_sceleton] |
jmp .out_eip |
; irq1 -> hid/keyboard.inc |
macro irqh [num] |
macro irqhh [num] |
{ |
forward |
p_irq#num : |
319,7 → 325,7 |
jmp irq_c |
} |
irqh 2,3,4,5,6,7,8,9,10,11,12,14,15 |
irqhh 2,3,4,5,6,7,8,9,10,11,12,14,15 |
irq_c: |
push ds es |
353,6 → 359,7 |
iret |
irqhandler: |
push edi |