forked from KolibriOS/kolibrios
kernel - fix by forum post=23224
event - small optimization, not more git-svn-id: svn://kolibrios.org@1067 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
parent
4ad5e0815b
commit
a730579b19
@ -364,7 +364,7 @@ align 4
|
||||
sys_sendwindowmsg: ;; f72
|
||||
dec ebx
|
||||
jnz .ret ;subfunction==1 ?
|
||||
pushfd
|
||||
;pushfd ;à íàôèãà?
|
||||
cli
|
||||
sub ecx,2
|
||||
je .sendkey
|
||||
@ -382,8 +382,8 @@ sys_sendwindowmsg: ;; f72
|
||||
inc byte[KEY_COUNT]
|
||||
mov [KEY_COUNT+1+eax],dl
|
||||
.result:
|
||||
setae byte[esp+36] ;ñ÷èòàåì, ÷òî èñõîäíî: dword[esp+36]==72
|
||||
.retf: popfd
|
||||
setae byte[esp+32] ;ñ÷èòàåì, ÷òî èñõîäíî: dword[esp+32]==72
|
||||
.retf: ;popfd
|
||||
.ret: ret
|
||||
|
||||
align 4
|
||||
|
@ -1013,11 +1013,10 @@ osloop:
|
||||
|
||||
checkidle:
|
||||
pushad
|
||||
mov ebx,[timer_ticks]
|
||||
call change_task
|
||||
jmp idle_loop_entry
|
||||
idle_loop:
|
||||
cmp ebx,[timer_ticks]
|
||||
cmp eax,[idlemem] ; eax == [timer_ticks]
|
||||
jne idle_exit
|
||||
rdtsc ;call _rdtsc
|
||||
mov ecx,eax
|
||||
@ -1026,14 +1025,17 @@ checkidle:
|
||||
sub eax,ecx
|
||||
add [idleuse],eax
|
||||
idle_loop_entry:
|
||||
mov eax,[timer_ticks] ; eax = [timer_ticks]
|
||||
cmp [check_idle_semaphore],0
|
||||
je idle_loop
|
||||
dec [check_idle_semaphore]
|
||||
idle_exit:
|
||||
mov [idlemem],eax ; eax == [timer_ticks]
|
||||
popad
|
||||
ret
|
||||
|
||||
uglobal
|
||||
idlemem dd 0x0
|
||||
idleuse dd 0x0
|
||||
idleusesec dd 0x0
|
||||
check_idle_semaphore dd 0x0
|
||||
|
Loading…
Reference in New Issue
Block a user