diff --git a/kernel/trunk/const.inc b/kernel/trunk/const.inc index d0131821d4..102a6345a1 100644 --- a/kernel/trunk/const.inc +++ b/kernel/trunk/const.inc @@ -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 diff --git a/kernel/trunk/core/debug.inc b/kernel/trunk/core/debug.inc index 92d53a07dc..3517d45953 100644 --- a/kernel/trunk/core/debug.inc +++ b/kernel/trunk/core/debug.inc @@ -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 diff --git a/kernel/trunk/core/taskman.inc b/kernel/trunk/core/taskman.inc index b9ab6012af..ee75d6d2c3 100644 --- a/kernel/trunk/core/taskman.inc +++ b/kernel/trunk/core/taskman.inc @@ -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 diff --git a/kernel/trunk/gui/event.inc b/kernel/trunk/gui/event.inc index 72336395d1..cd9f068f5f 100644 --- a/kernel/trunk/gui/event.inc +++ b/kernel/trunk/gui/event.inc @@ -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 diff --git a/kernel/trunk/kernel.asm b/kernel/trunk/kernel.asm index a5c9fe905f..8ea5bc2ad7 100644 --- a/kernel/trunk/kernel.asm +++ b/kernel/trunk/kernel.asm @@ -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 ----------- diff --git a/kernel/trunk/network/socket.inc b/kernel/trunk/network/socket.inc index 4307ad1348..7cd567b420 100644 --- a/kernel/trunk/network/socket.inc +++ b/kernel/trunk/network/socket.inc @@ -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 diff --git a/kernel/trunk/network/stack.inc b/kernel/trunk/network/stack.inc index 59e3f79de2..1d5094d88f 100644 --- a/kernel/trunk/network/stack.inc +++ b/kernel/trunk/network/stack.inc @@ -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