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
|
align 4
|
||||||
delay_hs: ; delay in 1/100 secs
|
delay_hs: ; delay in 1/100 secs
|
||||||
; ebx = delay time
|
; ebx = delay time
|
||||||
push ecx
|
|
||||||
push edx
|
|
||||||
|
|
||||||
mov edx, [timer_ticks]
|
pushad
|
||||||
;--------------------------------------
|
push ebx
|
||||||
align 4
|
xor esi, esi
|
||||||
newtic:
|
mov ecx, MANUAL_DESTROY
|
||||||
mov ecx, [timer_ticks]
|
call create_event
|
||||||
sub ecx, edx
|
test eax, eax
|
||||||
cmp ecx, ebx
|
jz .done
|
||||||
jae zerodelay
|
|
||||||
|
|
||||||
call change_task
|
mov ebx, edx
|
||||||
|
mov ecx, [esp]
|
||||||
jmp newtic
|
push eax
|
||||||
;--------------------------------------
|
call wait_event_timeout
|
||||||
align 4
|
pop eax
|
||||||
zerodelay:
|
mov ebx, [esp]
|
||||||
pop edx
|
call destroy_event
|
||||||
pop ecx
|
.done:
|
||||||
|
add esp, 4
|
||||||
|
popad
|
||||||
ret
|
ret
|
||||||
;-----------------------------------------------------------------------------
|
;-----------------------------------------------------------------------------
|
||||||
align 16 ;very often call this subrutine
|
align 16 ;very often call this subrutine
|
||||||
|
Loading…
Reference in New Issue
Block a user