forked from KolibriOS/kolibrios
[KERNEL] #2 Preparing to merge legacy TASKDATA into APPDATA:
- rename event_mask in APPDATA to occured_events, cause TASKDATA already has event_mask and they have different meaning and usage - small fixes git-svn-id: svn://kolibrios.org@8867 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
parent
9cdec89085
commit
d4bf03befc
@ -224,7 +224,7 @@ CURRENT_TASK = OS_BASE + 0x0003000
|
|||||||
;TASK_COUNT = OS_BASE + 0x0003004
|
;TASK_COUNT = OS_BASE + 0x0003004
|
||||||
TASK_BASE = OS_BASE + 0x0003010
|
TASK_BASE = OS_BASE + 0x0003010
|
||||||
TASK_DATA = OS_BASE + 0x0003020
|
TASK_DATA = OS_BASE + 0x0003020
|
||||||
TASK_EVENT = OS_BASE + 0x0003020
|
;TASK_EVENT = OS_BASE + 0x0003020
|
||||||
|
|
||||||
CDDataBuf = OS_BASE + 0x0005000
|
CDDataBuf = OS_BASE + 0x0005000
|
||||||
|
|
||||||
@ -516,7 +516,7 @@ struct APPDATA
|
|||||||
saved_box BOX ;+144
|
saved_box BOX ;+144
|
||||||
ipc_start dd ? ;+160
|
ipc_start dd ? ;+160
|
||||||
ipc_size dd ? ;+164
|
ipc_size dd ? ;+164
|
||||||
event_mask dd ? ;+168 ; mask which accumulates occurred events
|
occurred_events dd ? ;+168 ; mask which accumulates occurred events
|
||||||
debugger_slot dd ? ;+172
|
debugger_slot dd ? ;+172
|
||||||
terminate_protection dd ? ;+176
|
terminate_protection dd ? ;+176
|
||||||
keyboard_mode db ? ;+180
|
keyboard_mode db ? ;+180
|
||||||
|
@ -450,6 +450,6 @@ debugger_notify:
|
|||||||
; new debug event
|
; new debug event
|
||||||
mov eax, ebp
|
mov eax, ebp
|
||||||
shl eax, 8
|
shl eax, 8
|
||||||
or byte [SLOT_BASE+eax+APPDATA.event_mask+1], 1 ; set flag 100h
|
or byte [SLOT_BASE+eax+APPDATA.occurred_events+1], 1 ; set flag 100h
|
||||||
.ret:
|
.ret:
|
||||||
ret
|
ret
|
||||||
|
@ -942,7 +942,7 @@ proc set_app_params stdcall,slot:dword, params:dword, flags:dword
|
|||||||
rep movsd
|
rep movsd
|
||||||
|
|
||||||
cmp [thread_count], ebx
|
cmp [thread_count], ebx
|
||||||
adc dword [thread_count], 0 ; update number of processes
|
adc [thread_count], 0 ; update number of processes
|
||||||
shl ebx, 8
|
shl ebx, 8
|
||||||
lea edx, [ebx+SLOT_BASE+APP_EV_OFFSET]
|
lea edx, [ebx+SLOT_BASE+APP_EV_OFFSET]
|
||||||
mov [SLOT_BASE+APPDATA.fd_ev+ebx], edx
|
mov [SLOT_BASE+APPDATA.fd_ev+ebx], edx
|
||||||
|
@ -570,7 +570,7 @@ align 4
|
|||||||
;--------------------------------------
|
;--------------------------------------
|
||||||
align 4
|
align 4
|
||||||
.FlagAutoReset: ; retvals: BgrRedraw=5, IPC=7, Stack=8, Debug=9
|
.FlagAutoReset: ; retvals: BgrRedraw=5, IPC=7, Stack=8, Debug=9
|
||||||
btr [ebx+APPDATA.event_mask], eax
|
btr [ebx+APPDATA.occurred_events], eax
|
||||||
jnc .loop
|
jnc .loop
|
||||||
;--------------------------------------
|
;--------------------------------------
|
||||||
align 4
|
align 4
|
||||||
|
@ -626,7 +626,7 @@ high_code:
|
|||||||
call scheduler_add_thread
|
call scheduler_add_thread
|
||||||
|
|
||||||
mov dword [CURRENT_TASK], 2
|
mov dword [CURRENT_TASK], 2
|
||||||
mov dword [thread_count], 2
|
mov [thread_count], 2
|
||||||
mov dword [current_slot], SLOT_BASE + sizeof.APPDATA*2
|
mov dword [current_slot], SLOT_BASE + sizeof.APPDATA*2
|
||||||
mov dword [TASK_BASE], CURRENT_TASK + sizeof.TASKDATA*2
|
mov dword [TASK_BASE], CURRENT_TASK + sizeof.TASKDATA*2
|
||||||
|
|
||||||
@ -3606,7 +3606,7 @@ align 4
|
|||||||
;--------------------------------------
|
;--------------------------------------
|
||||||
align 4
|
align 4
|
||||||
.set:
|
.set:
|
||||||
or [edi+SLOT_BASE+APPDATA.event_mask], 100000b ; set event 6
|
or [edi+SLOT_BASE+APPDATA.occurred_events], 100000b ; set event 6; TODO use constant
|
||||||
;--------------------------------------
|
;--------------------------------------
|
||||||
align 4
|
align 4
|
||||||
.skip:
|
.skip:
|
||||||
@ -3674,7 +3674,7 @@ set_bgr_event:
|
|||||||
mov [edi+SLOT_BASE+APPDATA.draw_bgr_x], eax
|
mov [edi+SLOT_BASE+APPDATA.draw_bgr_x], eax
|
||||||
mov [edi+SLOT_BASE+APPDATA.draw_bgr_y], edx
|
mov [edi+SLOT_BASE+APPDATA.draw_bgr_y], edx
|
||||||
.common:
|
.common:
|
||||||
or [edi+SLOT_BASE+APPDATA.event_mask], 10000b ; set event 5
|
or [edi+SLOT_BASE+APPDATA.occurred_events], 10000b ; set event 5; TODO use constant
|
||||||
loop set_bgr_event
|
loop set_bgr_event
|
||||||
pop edi ecx
|
pop edi ecx
|
||||||
;--------- set event 5 stop -----------
|
;--------- set event 5 stop -----------
|
||||||
|
@ -1919,7 +1919,7 @@ socket_notify:
|
|||||||
; Socket and thread exists and socket is of non blocking type.
|
; Socket and thread exists and socket is of non blocking type.
|
||||||
; We'll try to flag an event to the thread.
|
; We'll try to flag an event to the thread.
|
||||||
shl ecx, 8
|
shl ecx, 8
|
||||||
or [SLOT_BASE + ecx + APPDATA.event_mask], EVENT_NETWORK
|
or [SLOT_BASE + ecx + APPDATA.occurred_events], EVENT_NETWORK
|
||||||
|
|
||||||
DEBUGF DEBUG_NETWORK_VERBOSE, "SOCKET_notify: poking thread %u!\n", ebx
|
DEBUGF DEBUG_NETWORK_VERBOSE, "SOCKET_notify: poking thread %u!\n", ebx
|
||||||
pop esi ecx ebx
|
pop esi ecx ebx
|
||||||
|
@ -436,8 +436,8 @@ net_send_event:
|
|||||||
mov edi, SLOT_BASE
|
mov edi, SLOT_BASE
|
||||||
mov ecx, [thread_count]
|
mov ecx, [thread_count]
|
||||||
.loop:
|
.loop:
|
||||||
add edi, 256
|
add edi, sizeof.APPDATA
|
||||||
or [edi + APPDATA.event_mask], EVENT_NETWORK2
|
or [edi + APPDATA.occurred_events], EVENT_NETWORK2
|
||||||
loop .loop
|
loop .loop
|
||||||
pop ecx edi
|
pop ecx edi
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user