[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:
Rustem Gimadutdinov (rgimad) 2021-06-16 13:57:17 +00:00
parent 9cdec89085
commit d4bf03befc
7 changed files with 11 additions and 11 deletions

View File

@ -224,7 +224,7 @@ CURRENT_TASK = OS_BASE + 0x0003000
;TASK_COUNT = OS_BASE + 0x0003004
TASK_BASE = OS_BASE + 0x0003010
TASK_DATA = OS_BASE + 0x0003020
TASK_EVENT = OS_BASE + 0x0003020
;TASK_EVENT = OS_BASE + 0x0003020
CDDataBuf = OS_BASE + 0x0005000
@ -516,7 +516,7 @@ struct APPDATA
saved_box BOX ;+144
ipc_start dd ? ;+160
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
terminate_protection dd ? ;+176
keyboard_mode db ? ;+180

View File

@ -450,6 +450,6 @@ debugger_notify:
; new debug event
mov eax, ebp
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

View File

@ -942,7 +942,7 @@ proc set_app_params stdcall,slot:dword, params:dword, flags:dword
rep movsd
cmp [thread_count], ebx
adc dword [thread_count], 0 ; update number of processes
adc [thread_count], 0 ; update number of processes
shl ebx, 8
lea edx, [ebx+SLOT_BASE+APP_EV_OFFSET]
mov [SLOT_BASE+APPDATA.fd_ev+ebx], edx

View File

@ -570,7 +570,7 @@ align 4
;--------------------------------------
align 4
.FlagAutoReset: ; retvals: BgrRedraw=5, IPC=7, Stack=8, Debug=9
btr [ebx+APPDATA.event_mask], eax
btr [ebx+APPDATA.occurred_events], eax
jnc .loop
;--------------------------------------
align 4

View File

@ -626,7 +626,7 @@ high_code:
call scheduler_add_thread
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 [TASK_BASE], CURRENT_TASK + sizeof.TASKDATA*2
@ -3606,7 +3606,7 @@ align 4
;--------------------------------------
align 4
.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
.skip:
@ -3674,7 +3674,7 @@ set_bgr_event:
mov [edi+SLOT_BASE+APPDATA.draw_bgr_x], eax
mov [edi+SLOT_BASE+APPDATA.draw_bgr_y], edx
.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
pop edi ecx
;--------- set event 5 stop -----------

View File

@ -1919,7 +1919,7 @@ socket_notify:
; Socket and thread exists and socket is of non blocking type.
; We'll try to flag an event to the thread.
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
pop esi ecx ebx

View File

@ -436,8 +436,8 @@ net_send_event:
mov edi, SLOT_BASE
mov ecx, [thread_count]
.loop:
add edi, 256
or [edi + APPDATA.event_mask], EVENT_NETWORK2
add edi, sizeof.APPDATA
or [edi + APPDATA.occurred_events], EVENT_NETWORK2
loop .loop
pop ecx edi