forked from KolibriOS/kolibrios
Kernel: cheap and cheat delay_hs
git-svn-id: svn://kolibrios.org@3595 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
parent
6a3ae451a1
commit
315305ed2a
@ -3853,26 +3853,25 @@ endp
|
||||
align 4
|
||||
delay_hs: ; delay in 1/100 secs
|
||||
; ebx = delay time
|
||||
push ecx
|
||||
push edx
|
||||
|
||||
mov edx, [timer_ticks]
|
||||
;--------------------------------------
|
||||
align 4
|
||||
newtic:
|
||||
mov ecx, [timer_ticks]
|
||||
sub ecx, edx
|
||||
cmp ecx, ebx
|
||||
jae zerodelay
|
||||
pushad
|
||||
push ebx
|
||||
xor esi, esi
|
||||
mov ecx, MANUAL_DESTROY
|
||||
call create_event
|
||||
test eax, eax
|
||||
jz .done
|
||||
|
||||
call change_task
|
||||
|
||||
jmp newtic
|
||||
;--------------------------------------
|
||||
align 4
|
||||
zerodelay:
|
||||
pop edx
|
||||
pop ecx
|
||||
mov ebx, edx
|
||||
mov ecx, [esp]
|
||||
push eax
|
||||
call wait_event_timeout
|
||||
pop eax
|
||||
mov ebx, [esp]
|
||||
call destroy_event
|
||||
.done:
|
||||
add esp, 4
|
||||
popad
|
||||
ret
|
||||
;-----------------------------------------------------------------------------
|
||||
align 16 ;very often call this subrutine
|
||||
|
Loading…
Reference in New Issue
Block a user