Fixed Network2 event (low level network event)

git-svn-id: svn://kolibrios.org@3518 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
hidnplayr 2013-05-17 13:33:04 +00:00
parent b7bd43fe91
commit a0f9d2e236
4 changed files with 79 additions and 77 deletions

View File

@ -576,12 +576,13 @@ EV_IPC = 7
EV_STACK = 8 EV_STACK = 8
; event mask bits for function 40 ; event mask bits for function 40
EVM_REDRAW = 1b EVM_REDRAW = 1b
EVM_KEY = 10b EVM_KEY = 10b
EVM_BUTTON = 100b EVM_BUTTON = 100b
EVM_EXIT = 1000b EVM_EXIT = 1000b
EVM_BACKGROUND = 10000b EVM_BACKGROUND = 10000b
EVM_MOUSE = 100000b EVM_MOUSE = 100000b
EVM_IPC = 1000000b EVM_IPC = 1000000b
EVM_STACK = 10000000b EVM_STACK = 10000000b
EVM_STACK2 = 0x400 EVM_DEBUG = 100000000b
EVM_STACK2 = 1000000000b

View File

@ -400,8 +400,9 @@ EVENT_MOUSE equ 0x00000020
EVENT_IPC equ 0x00000040 EVENT_IPC equ 0x00000040
EVENT_NETWORK equ 0x00000080 EVENT_NETWORK equ 0x00000080
EVENT_DEBUG equ 0x00000100 EVENT_DEBUG equ 0x00000100
EVENT_EXTENDED equ 0x00000200 EVENT_NETWORK2 equ 0x00000200
EVENT_NETWORK2 equ 0x00000400 EVENT_EXTENDED equ 0x00000400
EV_INTR equ 1 EV_INTR equ 1
@ -568,41 +569,41 @@ ends
struct MUTEX struct MUTEX
lhead LHEAD lhead LHEAD
count dd ? count dd ?
ends ends
struct PCIDEV struct PCIDEV
bk dd ? bk dd ?
fd dd ? fd dd ?
vendor_device_id dd ? vendor_device_id dd ?
class dd ? class dd ?
devfn db ? devfn db ?
bus db ? bus db ?
ends ends
; The following macro assume that we are on uniprocessor machine. ; The following macro assume that we are on uniprocessor machine.
; Serious work is needed for multiprocessor machines. ; Serious work is needed for multiprocessor machines.
macro spin_lock_irqsave spinlock macro spin_lock_irqsave spinlock
{ {
pushf pushf
cli cli
} }
macro spin_unlock_irqrestore spinlock macro spin_unlock_irqrestore spinlock
{ {
popf popf
} }
macro spin_lock_irq spinlock macro spin_lock_irq spinlock
{ {
cli cli
} }
macro spin_unlock_irq spinlock macro spin_unlock_irq spinlock
{ {
sti sti
} }
struct MEM_STATE struct MEM_STATE
mutex MUTEX mutex MUTEX
smallmap dd ? smallmap dd ?
treemap dd ? treemap dd ?
topsize dd ? topsize dd ?
top dd ? top dd ?

View File

@ -304,29 +304,29 @@ wait_event: ;; EXPORT use
mov ecx, eax ; wait_param mov ecx, eax ; wait_param
mov edx, get_event_alone ; wait_test mov edx, get_event_alone ; wait_test
call Wait_events ; timeout ignored call Wait_events ; timeout ignored
jmp wait_finish jmp wait_finish
;----------------------------------------------------------------------------- ;-----------------------------------------------------------------------------
align 4 align 4
wait_event_timeout: wait_event_timeout:
;param: ;param:
; eax - event ; eax - event
; ebx - uid (for Dummy testing) ; ebx - uid (for Dummy testing)
; ecx - timeout in timer ticks ; ecx - timeout in timer ticks
;retval: ;retval:
; eax - EVENT handle or 0 if timeout ; eax - EVENT handle or 0 if timeout
call DummyTest call DummyTest
mov ebx, ecx mov ebx, ecx
mov ecx, eax ; wait_param mov ecx, eax ; wait_param
mov edx, get_event_alone ; wait_test mov edx, get_event_alone ; wait_test
call Wait_events_ex call Wait_events_ex
test eax, eax test eax, eax
jnz wait_finish jnz wait_finish
ret ret
;----------------------------------------------------------------------------- ;-----------------------------------------------------------------------------
align 4 align 4
get_event_ex: ;; f68:14 get_event_ex: ;; f68:14
;info: ;info:
; Îæèäàíèå ëþáîãî ñîáûòèÿ â î÷åðåäè EventList òåêóùåãî ñëîòà ; Îæèäàíèå ëþáîãî ñîáûòèÿ â î÷åðåäè EventList òåêóùåãî ñëîòà
; Данные события code - копируются в память приложения (косвенно по edi) ; Данные события code - копируются в память приложения (косвенно по edi)
; При активном флаге MANUAL_RESET - больше ничего ; При активном флаге MANUAL_RESET - больше ничего
; Иначе: флаги EVENT_SIGNALED и EVENT_WATCHED у полученного события сбрасываются, ; Иначе: флаги EVENT_SIGNALED и EVENT_WATCHED у полученного события сбрасываются,
@ -515,8 +515,8 @@ align 4
jz .no_events ; исчерпали все биты маски, но ничего не нашли ??? jz .no_events ; исчерпали все биты маски, но ничего не нашли ???
btr ecx, eax ; сбрасываем проверяемый бит маски btr ecx, eax ; сбрасываем проверяемый бит маски
; переходим на обработчик этого (eax) бита ; переходим на обработчик этого (eax) бита
cmp eax, 9 cmp eax, 10
jae .loop ; eax=[9..31], ignored (event 10...32) jae .loop ; eax=[10..31], ignored (event 11...32)
cmp eax, 3 cmp eax, 3
je .loop ; eax=3, ignored (event 4) je .loop ; eax=3, ignored (event 4)
@ -527,7 +527,7 @@ align 4
cmp eax, 5 cmp eax, 5
je .mouse_check ; eax=5, retvals=eax+1 (event 6) je .mouse_check ; eax=5, retvals=eax+1 (event 6)
ja .FlagAutoReset ; eax=[6..8], retvals=eax+1 (event 7...9) ja .FlagAutoReset ; eax=[6..8], retvals=eax+1 (event 7...10)
cmp eax, 1 cmp eax, 1
jae .BtKy ; eax=[1,2], retvals=eax+1 (event 2,3) jae .BtKy ; eax=[1,2], retvals=eax+1 (event 2,3)
@ -609,7 +609,7 @@ align 4
je .result je .result
add edx, 8 add edx, 8
cmp edx, hotkey_buffer+120*8 cmp edx, hotkey_buffer+120*8
jb @b jb @b
jmp .loop jmp .loop
;end. ;end.
;----------------------------------------------------------------------------- ;-----------------------------------------------------------------------------

View File

@ -317,7 +317,7 @@ NET_send_event:
loop .loop loop .loop
pop ecx edi pop ecx edi
; call change_task call change_task
ret ret