forked from KolibriOS/kolibrios
[KERNEL] Refactoring:
- optimize struct zeroing in sys32.inc - set_app_param: delete setting completely unused APPDATA.event_filter (also make this field reserved) - update some copyringhs - other small fixes git-svn-id: svn://kolibrios.org@8858 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
parent
0f47c4c2c8
commit
f3f40df401
@ -1,6 +1,6 @@
|
|||||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||||
;; ;;
|
;; ;;
|
||||||
;; Copyright (C) KolibriOS team 2004-2017. All rights reserved. ;;
|
;; Copyright (C) KolibriOS team 2004-2021. All rights reserved. ;;
|
||||||
;; Distributed under terms of the GNU General Public License ;;
|
;; Distributed under terms of the GNU General Public License ;;
|
||||||
;; ;;
|
;; ;;
|
||||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||||
@ -505,7 +505,7 @@ struct APPDATA
|
|||||||
wait_param dd ? ;+100 +++
|
wait_param dd ? ;+100 +++
|
||||||
tls_base dd ? ;+104
|
tls_base dd ? ;+104
|
||||||
dd ? ;+108
|
dd ? ;+108
|
||||||
event_filter dd ? ;+112
|
dd ? ;+112
|
||||||
draw_bgr_x dd ? ;+116
|
draw_bgr_x dd ? ;+116
|
||||||
draw_bgr_y dd ? ;+120
|
draw_bgr_y dd ? ;+120
|
||||||
dd ? ;+124
|
dd ? ;+124
|
||||||
@ -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
|
event_mask 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
|
||||||
@ -538,7 +538,7 @@ APP_OBJ_OFFSET = 48
|
|||||||
APP_EV_OFFSET = 40
|
APP_EV_OFFSET = 40
|
||||||
|
|
||||||
struct TASKDATA
|
struct TASKDATA
|
||||||
event_mask dd ?
|
event_mask dd ? ; mask which stores event types allowed for task
|
||||||
pid dd ?
|
pid dd ?
|
||||||
dw ?
|
dw ?
|
||||||
state db ?
|
state db ?
|
||||||
@ -590,6 +590,7 @@ ends
|
|||||||
|
|
||||||
label WDATA.fl_wstyle byte at WDATA.cl_workarea + 3
|
label WDATA.fl_wstyle byte at WDATA.cl_workarea + 3
|
||||||
|
|
||||||
|
assert sizeof.WDATA = 32
|
||||||
|
|
||||||
struct SYS_VARS
|
struct SYS_VARS
|
||||||
bpp dd ?
|
bpp dd ?
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||||
;; ;;
|
;; ;;
|
||||||
;; Copyright (C) KolibriOS team 2004-2020. All rights reserved. ;;
|
;; Copyright (C) KolibriOS team 2004-2021. All rights reserved. ;;
|
||||||
;; Distributed under terms of the GNU General Public License. ;;
|
;; Distributed under terms of the GNU General Public License. ;;
|
||||||
;; ;;
|
;; ;;
|
||||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||||
@ -554,7 +554,7 @@ destroy_thread:
|
|||||||
|
|
||||||
pusha ; save window coordinates for window restoring
|
pusha ; save window coordinates for window restoring
|
||||||
cld
|
cld
|
||||||
shl esi, 5
|
shl esi, BSF sizeof.WDATA
|
||||||
add esi, window_data
|
add esi, window_data
|
||||||
mov eax, [esi+WDATA.box.left]
|
mov eax, [esi+WDATA.box.left]
|
||||||
mov [draw_limits.left], eax
|
mov [draw_limits.left], eax
|
||||||
@ -566,16 +566,12 @@ destroy_thread:
|
|||||||
mov [draw_limits.bottom], eax
|
mov [draw_limits.bottom], eax
|
||||||
|
|
||||||
xor eax, eax
|
xor eax, eax
|
||||||
mov [esi+WDATA.box.left], eax
|
mov edi, esi
|
||||||
mov [esi+WDATA.box.width], eax
|
mov ecx, sizeof.WDATA/4
|
||||||
mov [esi+WDATA.box.top], eax
|
rep stosd
|
||||||
mov [esi+WDATA.box.height], eax
|
|
||||||
mov [esi+WDATA.cl_workarea], eax
|
|
||||||
mov [esi+WDATA.cl_titlebar], eax
|
|
||||||
mov [esi+WDATA.cl_frames], eax
|
|
||||||
mov dword [esi+WDATA.z_modif], eax; clear all flags: z_modif, wstate, redraw, wdrawn
|
|
||||||
lea edi, [esi-window_data+draw_data]
|
lea edi, [esi-window_data+draw_data]
|
||||||
mov ecx, 32/4
|
mov ecx, sizeof.WDATA/4
|
||||||
rep stosd
|
rep stosd
|
||||||
popa
|
popa
|
||||||
|
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||||
;; ;;
|
;; ;;
|
||||||
;; Copyright (C) KolibriOS team 2004-2016. All rights reserved. ;;
|
;; Copyright (C) KolibriOS team 2004-2021. All rights reserved. ;;
|
||||||
;; Distributed under terms of the GNU General Public License. ;;
|
;; Distributed under terms of the GNU General Public License. ;;
|
||||||
;; ;;
|
;; ;;
|
||||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||||
@ -484,9 +484,9 @@ pid_to_slot:
|
|||||||
push ebx
|
push ebx
|
||||||
push ecx
|
push ecx
|
||||||
mov ebx, [TASK_COUNT]
|
mov ebx, [TASK_COUNT]
|
||||||
shl ebx, 5 ; ebx *= 32 (32 is size of TASKDATA struct)
|
shl ebx, BSF sizeof.TASKDATA ; multiply by size
|
||||||
; add 2*32 cause:
|
; add 2*32 cause:
|
||||||
; 0x80003000 - 0x80003020 isnt a task actually
|
; [TASK_TABLE; TASK_TABLE + 32) isnt a task actually
|
||||||
; skip first process in the task table
|
; skip first process in the task table
|
||||||
mov ecx, 2*32
|
mov ecx, 2*32
|
||||||
|
|
||||||
@ -509,7 +509,7 @@ pid_to_slot:
|
|||||||
ret
|
ret
|
||||||
|
|
||||||
.pid_found:
|
.pid_found:
|
||||||
shr ecx, 5
|
shr ecx, BSF sizeof.TASKDATA ; divide by size
|
||||||
mov eax, ecx ;convert offset to index of slot
|
mov eax, ecx ;convert offset to index of slot
|
||||||
pop ecx
|
pop ecx
|
||||||
pop ebx
|
pop ebx
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||||
;;
|
;;
|
||||||
;; Copyright (C) KolibriOS team 2004-2020. All rights reserved.
|
;; Copyright (C) KolibriOS team 2004-2021. All rights reserved.
|
||||||
;; PROGRAMMING:
|
;; PROGRAMMING:
|
||||||
;; Ivan Poddubny
|
;; Ivan Poddubny
|
||||||
;; Marat Zakiyanov (Mario79)
|
;; Marat Zakiyanov (Mario79)
|
||||||
@ -30,6 +30,12 @@
|
|||||||
;; turbanoff
|
;; turbanoff
|
||||||
;; Asper
|
;; Asper
|
||||||
;; art_zh
|
;; art_zh
|
||||||
|
;; dunkaist
|
||||||
|
;; Coldy
|
||||||
|
;; rgimad
|
||||||
|
;; Boppan
|
||||||
|
;; Doczom
|
||||||
|
;; and others
|
||||||
;;
|
;;
|
||||||
;; Data in this file was originally part of MenuetOS project which is
|
;; Data in this file was originally part of MenuetOS project which is
|
||||||
;; distributed under the terms of GNU GPL. It is modified and redistributed as
|
;; distributed under the terms of GNU GPL. It is modified and redistributed as
|
||||||
@ -4045,9 +4051,6 @@ align 4
|
|||||||
set_app_param:
|
set_app_param:
|
||||||
mov edi, [TASK_BASE]
|
mov edi, [TASK_BASE]
|
||||||
mov eax, ebx
|
mov eax, ebx
|
||||||
btr eax, 3 ; move MOUSE_FILTRATION
|
|
||||||
mov ebx, [current_slot] ; bit into event_filter
|
|
||||||
setc byte [ebx+APPDATA.event_filter]
|
|
||||||
xchg eax, [edi + TASKDATA.event_mask] ; set new event mask
|
xchg eax, [edi + TASKDATA.event_mask] ; set new event mask
|
||||||
mov [esp+32], eax ; return old mask value
|
mov [esp+32], eax ; return old mask value
|
||||||
ret
|
ret
|
||||||
|
Loading…
Reference in New Issue
Block a user