From 6e80a53e5e92dad6d89e540cb46288310a791f55 Mon Sep 17 00:00:00 2001 From: "Sergey Semyonov (Serge)" Date: Tue, 19 Mar 2013 03:38:52 +0000 Subject: [PATCH] kernel: wait_event_timeout git-svn-id: svn://kolibrios.org@3390 a494cfbc-eb01-0410-851d-a64ba20cac60 --- kernel/trunk/core/peload.inc | 1 + kernel/trunk/gui/event.inc | 17 ++++++++++++++++- 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/kernel/trunk/core/peload.inc b/kernel/trunk/core/peload.inc index d94007af43..4969247236 100644 --- a/kernel/trunk/core/peload.inc +++ b/kernel/trunk/core/peload.inc @@ -288,6 +288,7 @@ __exports: destroy_event, 'DestroyEvent', \ ; raise_event, 'RaiseEvent', \ ; eax, ebx, edx, esi wait_event, 'WaitEvent', \ ; eax, ebx + wait_event_timeout, 'WaitEventTimeout', \ ; eax, ebx, ecx get_event_ex, 'GetEvent', \ ; edi \ create_kernel_object, 'CreateObject', \ diff --git a/kernel/trunk/gui/event.inc b/kernel/trunk/gui/event.inc index 4583124980..ff051e1285 100644 --- a/kernel/trunk/gui/event.inc +++ b/kernel/trunk/gui/event.inc @@ -307,6 +307,21 @@ wait_event: ;; EXPORT use jmp wait_finish ;----------------------------------------------------------------------------- align 4 +wait_event_timeout: +;param: +; eax - event +; ebx - uid (for Dummy testing) +; ecx - timeout in timer ticks +;retval: +; eax - EVENT handle or 0 if timeout + call DummyTest + mov ebx, ecx + mov ecx, eax ; wait_param + mov edx, get_event_alone ; wait_test + call Wait_events_ex + jmp wait_finish +;----------------------------------------------------------------------------- +align 4 get_event_ex: ;; f68:14 ;info: ; Ожидание любого события в очереди EventList текущего слота @@ -595,4 +610,4 @@ align 4 jb @b jmp .loop ;end. -;----------------------------------------------------------------------------- \ No newline at end of file +;-----------------------------------------------------------------------------