[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:
Rustem Gimadutdinov (rgimad) 2021-06-15 16:24:33 +00:00
parent 0f47c4c2c8
commit f3f40df401
4 changed files with 23 additions and 23 deletions

View File

@ -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 ;;
;; ;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
@ -505,7 +505,7 @@ struct APPDATA
wait_param dd ? ;+100 +++
tls_base dd ? ;+104
dd ? ;+108
event_filter dd ? ;+112
dd ? ;+112
draw_bgr_x dd ? ;+116
draw_bgr_y dd ? ;+120
dd ? ;+124
@ -516,7 +516,7 @@ struct APPDATA
saved_box BOX ;+144
ipc_start dd ? ;+160
ipc_size dd ? ;+164
event_mask dd ? ;+168
event_mask dd ? ;+168 ; mask which accumulates occurred events
debugger_slot dd ? ;+172
terminate_protection dd ? ;+176
keyboard_mode db ? ;+180
@ -538,7 +538,7 @@ APP_OBJ_OFFSET = 48
APP_EV_OFFSET = 40
struct TASKDATA
event_mask dd ?
event_mask dd ? ; mask which stores event types allowed for task
pid dd ?
dw ?
state db ?
@ -590,6 +590,7 @@ ends
label WDATA.fl_wstyle byte at WDATA.cl_workarea + 3
assert sizeof.WDATA = 32
struct SYS_VARS
bpp dd ?

View File

@ -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. ;;
;; ;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
@ -554,7 +554,7 @@ destroy_thread:
pusha ; save window coordinates for window restoring
cld
shl esi, 5
shl esi, BSF sizeof.WDATA
add esi, window_data
mov eax, [esi+WDATA.box.left]
mov [draw_limits.left], eax
@ -566,16 +566,12 @@ destroy_thread:
mov [draw_limits.bottom], eax
xor eax, eax
mov [esi+WDATA.box.left], eax
mov [esi+WDATA.box.width], eax
mov [esi+WDATA.box.top], eax
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
mov edi, esi
mov ecx, sizeof.WDATA/4
rep stosd
lea edi, [esi-window_data+draw_data]
mov ecx, 32/4
mov ecx, sizeof.WDATA/4
rep stosd
popa

View File

@ -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. ;;
;; ;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
@ -484,9 +484,9 @@ pid_to_slot:
push ebx
push ecx
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:
; 0x80003000 - 0x80003020 isnt a task actually
; [TASK_TABLE; TASK_TABLE + 32) isnt a task actually
; skip first process in the task table
mov ecx, 2*32
@ -509,7 +509,7 @@ pid_to_slot:
ret
.pid_found:
shr ecx, 5
shr ecx, BSF sizeof.TASKDATA ; divide by size
mov eax, ecx ;convert offset to index of slot
pop ecx
pop ebx

View File

@ -1,6 +1,6 @@
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;
;; Copyright (C) KolibriOS team 2004-2020. All rights reserved.
;; Copyright (C) KolibriOS team 2004-2021. All rights reserved.
;; PROGRAMMING:
;; Ivan Poddubny
;; Marat Zakiyanov (Mario79)
@ -30,6 +30,12 @@
;; turbanoff
;; Asper
;; art_zh
;; dunkaist
;; Coldy
;; rgimad
;; Boppan
;; Doczom
;; and others
;;
;; 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
@ -4045,9 +4051,6 @@ align 4
set_app_param:
mov edi, [TASK_BASE]
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
mov [esp+32], eax ; return old mask value
ret