minor optimizations and code cleanups

This commit is contained in:
Stefan Lankes 2012-09-10 05:34:18 -07:00
parent cf503426bf
commit da30b95e9d

View file

@ -436,9 +436,11 @@ isr31:
extern syscall_handler
; used to realize system calls
; by entering the handler, the interrupt flag is not cleared
isrsyscall:
push ds
cli
push es
push ds
push ebp
push edi
push esi
@ -446,21 +448,27 @@ isrsyscall:
push ecx
push ebx
push eax
; set kernel data segmenets
mov ax, 0x10
mov ds, ax
mov es, ax
mov eax, [esp]
sti
call syscall_handler
cli
add esp, 4 ; eax contains the return value
; => we did not restore eax
; => we did not restore eax
pop ebx
pop ecx
pop edx
pop esi
pop edi
pop ebp
pop es
pop ds
pop es
iret
global irq0
@ -766,8 +774,8 @@ switch_context:
push DWORD 0x0 ; Interrupt number
push DWORD 0x00edbabe ; Error code
pusha ; Registers...
push es
push ds
push 0x10 ; kernel data segment
push 0x10 ; kernel data segment
jmp common_switch