/kernel/trunk/const.inc |
---|
221,7 → 221,7 |
TASK_TABLE = OS_BASE + 0x0003000 |
CURRENT_TASK = OS_BASE + 0x0003000 |
TASK_COUNT = OS_BASE + 0x0003004 |
;TASK_COUNT = OS_BASE + 0x0003004 |
TASK_BASE = OS_BASE + 0x0003010 |
TASK_DATA = OS_BASE + 0x0003020 |
TASK_EVENT = OS_BASE + 0x0003020 |
/kernel/trunk/core/sched.inc |
---|
1,6 → 1,6 |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
;; ;; |
;; Copyright (C) KolibriOS team 2004-2015. All rights reserved. ;; |
;; Copyright (C) KolibriOS team 2004-2021. All rights reserved. ;; |
;; Copyright (C) MenuetOS 2000-2004 Ville Mikael Turjanmaa ;; |
;; Distributed under terms of the GNU General Public License ;; |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
75,7 → 75,7 |
ret |
align 4 |
updatecputimes: |
mov ecx, [TASK_COUNT] |
mov ecx, [thread_count] |
mov edi, TASK_DATA |
.newupdate: |
xor eax, eax |
/kernel/trunk/core/sys32.inc |
---|
629,7 → 629,7 |
; activate window |
movzx eax, word [WIN_STACK + esi*2] |
cmp eax, [TASK_COUNT] |
cmp eax, [thread_count] |
jne .dont_activate |
pushad |
.check_next_window: |
719,7 → 719,7 |
mov eax, 2 |
mov ecx, SLOT_BASE+2*0x100+APPDATA.debugger_slot |
.xd0: |
cmp eax, [TASK_COUNT] |
cmp eax, [thread_count] |
ja .xd1 |
cmp dword [ecx], esi |
jnz @f |
/kernel/trunk/core/taskman.inc |
---|
281,7 → 281,7 |
; eax=[new_thread_slot]<>0 - ok |
; 0 - failed. |
;This function find least empty slot. |
;It doesn't increase [TASK_COUNT]! |
;It doesn't increase [thread_count]! |
mov edx, thr_slot_map |
483,7 → 483,7 |
;Search process by PID. |
push ebx |
push ecx |
mov ebx, [TASK_COUNT] |
mov ebx, [thread_count] |
shl ebx, BSF sizeof.TASKDATA ; multiply by size |
; add 2*32 cause: |
; [TASK_TABLE; TASK_TABLE + 32) isnt a task actually |
941,8 → 941,8 |
shr ecx, 2 |
rep movsd |
cmp [TASK_COUNT], ebx |
adc dword [TASK_COUNT], 0 ; update number of processes |
cmp [thread_count], ebx |
adc dword [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 |
/kernel/trunk/core/v86.inc |
---|
1,6 → 1,6 |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
;; ;; |
;; Copyright (C) KolibriOS team 2007-2015. All rights reserved. ;; |
;; Copyright (C) KolibriOS team 2007-2021. All rights reserved. ;; |
;; Distributed under terms of the GNU General Public License ;; |
;; ;; |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
840,7 → 840,7 |
jmp v86_exc_c.simulate_int |
.notcurrent: |
mov ebx, SLOT_BASE + 0x100 |
mov ecx, [TASK_COUNT] |
mov ecx, [thread_count] |
.scan: |
cmp [ebx+APPDATA.process], eax |
jnz .cont |
/kernel/trunk/data32.inc |
---|
1,6 → 1,6 |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
;; ;; |
;; Copyright (C) KolibriOS team 2004-2015. All rights reserved. ;; |
;; Copyright (C) KolibriOS team 2004-2021. All rights reserved. ;; |
;; Distributed under terms of the GNU General Public License ;; |
;; ;; |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
439,6 → 439,7 |
current_process dd ? |
current_slot dd ? ; i.e. cureent thread |
thread_count dd ? |
; device addresses |
mididp dd ? |
/kernel/trunk/gui/event.inc |
---|
1,6 → 1,6 |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
;; ;; |
;; Copyright (C) KolibriOS team 2004-2015. All rights reserved. ;; |
;; Copyright (C) KolibriOS team 2004-2021. All rights reserved. ;; |
;; Copyright (C) MenuetOS 2000-2004 Ville Mikael Turjanmaa ;; |
;; Distributed under terms of the GNU General Public License ;; |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
588,7 → 588,7 |
.Buttons: ; eax=2, retval Buttons=3 |
cmp byte[BTN_COUNT], 0 |
je .loop ; empty ??? |
cmp edx, [TASK_COUNT] |
cmp edx, [thread_count] |
jne .loop ; not Top ??? |
mov edx, [BTN_BUFF] |
shr edx, 8 |
601,7 → 601,7 |
;-------------------------------------- |
align 4 |
.Keys: ; eax==1 |
cmp edx, [TASK_COUNT] |
cmp edx, [thread_count] |
jne @f ; not Top ??? |
cmp [KEY_COUNT], al; al==1 |
jae .result ; not empty ??? |
/kernel/trunk/gui/window.inc |
---|
1,6 → 1,6 |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
;; ;; |
;; Copyright (C) KolibriOS team 2004-2015. All rights reserved. ;; |
;; Copyright (C) KolibriOS team 2004-2021. All rights reserved. ;; |
;; Copyright (C) MenuetOS 2000-2004 Ville Mikael Turjanmaa ;; |
;; Distributed under terms of the GNU General Public License ;; |
;; ;; |
57,7 → 57,7 |
;-------------------------------------- |
@@: |
; type IV & V - skinned window (resizable & not) |
mov eax, [TASK_COUNT] |
mov eax, [thread_count] |
movzx eax, word[WIN_POS + eax * 2] |
cmp eax, [CURRENT_TASK] |
setz al |
425,7 → 425,7 |
push ebp |
mov ebp, [TASK_COUNT] |
mov ebp, [thread_count] |
cmp ebp, 1 |
jbe .exit |
438,7 → 438,7 |
align 4 |
.layout: |
mov esi, 1 ; = num in window stack |
mov ebp, [TASK_COUNT] |
mov ebp, [thread_count] |
;-------------------------------------- |
align 4 |
.next_window: |
510,7 → 510,7 |
cmp dword[esp+10h], ZPOS_ALWAYS_TOP |
jle .layout |
;--------------------------------------------- |
mov esi, [TASK_COUNT] |
mov esi, [thread_count] |
movzx edi, word[WIN_POS + esi * 2] |
shl edi, 5 |
add edi, window_data |
532,7 → 532,7 |
;------------------------------------------------------------------------------ |
;? <description> |
;------------------------------------------------------------------------------ |
mov ecx, [TASK_COUNT] |
mov ecx, [thread_count] |
mov edi, window_data + sizeof.WDATA * 2 |
call force_redraw_background |
dec ecx |
913,7 → 913,7 |
;? Activate window, redrawing if necessary |
;------------------------------------------------------------------------------ |
push -1 |
mov eax, [TASK_COUNT] |
mov eax, [thread_count] |
lea eax, [WIN_POS + eax * 2] |
cmp eax, esi |
pop eax |
930,7 → 930,7 |
call window._.window_activate |
pushad |
mov edi, [TASK_COUNT] |
mov edi, [thread_count] |
movzx esi, word[WIN_POS + edi * 2] |
shl esi, 5 |
add esi, window_data |
943,7 → 943,7 |
add ecx, eax |
add edx, ebx |
mov edi, [TASK_COUNT] |
mov edi, [thread_count] |
movzx esi, word[WIN_POS + edi * 2] |
call window._.set_screen |
978,7 → 978,7 |
cli |
xor edx, edx |
mov eax, 2 ; we do not minimize the kernel thread N1 |
mov ebx, [TASK_COUNT] |
mov ebx, [thread_count] |
;-------------------------------------- |
align 4 |
.loop: |
1105,7 → 1105,7 |
mov [edi + WDATA.fl_redraw], 1 |
and [edi + WDATA.fl_wstate], not WSTATE_MINIMIZED |
mov ebp, window._.set_screen |
cmp eax, [TASK_COUNT] |
cmp eax, [thread_count] |
jz @f |
mov ebp, calculatescreen |
;-------------------------------------- |
1143,7 → 1143,7 |
je .exit |
; okay, minimize or restore top-most window and exit |
mov eax, [TASK_COUNT] |
mov eax, [thread_count] |
mov bl, 0 |
xchg [window_minimize], bl |
dec bl |
1962,9 → 1962,9 |
push eax ebx |
; if type of current active window is 3 or 4, it must be redrawn |
mov ebx, [TASK_COUNT] |
mov ebx, [thread_count] |
; DEBUGF 1, "K : TASK_COUNT (0x%x)\n", ebx |
; DEBUGF 1, "K : thread_count (0x%x)\n", ebx |
movzx ebx, word[WIN_POS + ebx * 2] |
shl ebx, 5 |
1992,7 → 1992,7 |
;-------------------------------------- |
align 4 |
.next_stack_window: |
cmp eax, [TASK_COUNT] |
cmp eax, [thread_count] |
jae .move_self_up |
inc eax |
2010,8 → 2010,8 |
align 4 |
.move_self_up: |
movzx ebx, word[esi] |
; number of processes |
mov ax, [TASK_COUNT] |
; number of thread |
mov ax, word [thread_count] |
; this is the last (and the upper) |
mov [WIN_STACK + ebx * 2], ax |
2020,7 → 2020,7 |
;-------------------------------------- |
align 4 |
.next_window_pos: |
cmp eax, [TASK_COUNT] |
cmp eax, [thread_count] |
jae .reset_vars |
inc eax |
movzx ebx, word[WIN_STACK + eax * 2] |
2056,7 → 2056,7 |
;-------------------------------------- |
align 4 |
.next_stack_window: |
cmp eax, [TASK_COUNT] |
cmp eax, [thread_count] |
jae .move_self_down |
inc eax |
cmp [WIN_STACK + eax * 2], bx |
2074,7 → 2074,7 |
;-------------------------------------- |
align 4 |
.next_window_pos: |
cmp eax, [TASK_COUNT] |
cmp eax, [thread_count] |
jae .reset_vars |
inc eax |
movzx ebx, word[WIN_STACK + eax * 2] |
2118,7 → 2118,7 |
.next_window: |
add esi, 2 |
mov eax, [TASK_COUNT] |
mov eax, [thread_count] |
lea eax, word[WIN_POS + eax * 2] ; number of the upper window |
cmp esi, eax |
2172,7 → 2172,7 |
;? <description> |
;------------------------------------------------------------------------------ |
xor eax, eax |
mov edx, [TASK_COUNT] |
mov edx, [thread_count] |
movzx edx, word[WIN_POS + edx * 2] |
cmp edx, [CURRENT_TASK] |
jne @f |
2377,7 → 2377,7 |
cli |
push ebp |
mov ebp, [TASK_COUNT] |
mov ebp, [thread_count] |
cmp ebp, 1 |
jbe .exit |
2395,7 → 2395,7 |
align 4 |
.layout: |
mov esi, 1 ; = num in window stack |
mov ebp, [TASK_COUNT] |
mov ebp, [thread_count] |
;-------------------------------------- |
align 4 |
.next_window: |
/kernel/trunk/hid/keyboard.inc |
---|
1,6 → 1,6 |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
;; ;; |
;; Copyright (C) KolibriOS team 2004-2015. All rights reserved. ;; |
;; Copyright (C) KolibriOS team 2004-2021. All rights reserved. ;; |
;; Copyright (C) MenuetOS 2000-2004 Ville Mikael Turjanmaa ;; |
;; Distributed under terms of the GNU General Public License ;; |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
103,7 → 103,7 |
;--------------------------------------------------------------------- |
align 4 |
set_keyboard_data: |
movzx eax, word[TASK_COUNT]; top window process |
movzx eax, word[thread_count]; top window process |
movzx eax, word[WIN_POS+eax*2] |
shl eax, 8 |
mov al, [SLOT_BASE+eax+APPDATA.keyboard_mode] |
194,7 → 194,7 |
;--------------------------------------------------------------------- |
align 4 |
irq1: |
movzx eax, word[TASK_COUNT]; top window process |
movzx eax, word[thread_count]; top window process |
movzx eax, word[WIN_POS+eax*2] |
shl eax, 8 |
mov al, [SLOT_BASE+eax+APPDATA.keyboard_mode] |
/kernel/trunk/hid/mousedrv.inc |
---|
1,6 → 1,6 |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
;; ;; |
;; Copyright (C) KolibriOS team 2004-2015. All rights reserved. ;; |
;; Copyright (C) KolibriOS team 2004-2021. All rights reserved. ;; |
;; Distributed under terms of the GNU General Public License ;; |
;; ;; |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
122,7 → 122,7 |
cmp esi, [current_cursor] |
je .draw |
mov eax, [TASK_COUNT] |
mov eax, [thread_count] |
movzx eax, word [WIN_POS+eax*2] |
shl eax, 8 |
/kernel/trunk/kernel.asm |
---|
626,7 → 626,7 |
call scheduler_add_thread |
mov dword [CURRENT_TASK], 2 |
mov dword [TASK_COUNT], 2 |
mov dword [thread_count], 2 |
mov dword [current_slot], SLOT_BASE + sizeof.APPDATA*2 |
mov dword [TASK_BASE], CURRENT_TASK + sizeof.TASKDATA*2 |
1966,7 → 1966,7 |
ret |
.msz: |
mov edi, [TASK_COUNT] |
mov edi, [thread_count] |
movzx edi, word [WIN_POS + edi*2] |
cmp edi, [CURRENT_TASK] |
jne @f |
2189,7 → 2189,7 |
jg exit_for_anyone |
mov [BOOT.shutdown_type], cl |
mov eax, [TASK_COUNT] |
mov eax, [thread_count] |
mov [SYS_SHUTDOWN], al |
mov [shutdown_processes], eax |
call wakeup_osloop |
2212,10 → 2212,10 |
push ecx |
cmp ecx, 2 |
jb noprocessterminate |
mov edx, [TASK_COUNT] |
mov edx, [thread_count] |
cmp ecx, edx |
ja noprocessterminate |
mov eax, [TASK_COUNT] |
mov eax, [thread_count] |
shl ecx, BSF sizeof.TASKDATA |
mov edx, [ecx+CURRENT_TASK+TASKDATA.pid] |
add ecx, CURRENT_TASK+TASKDATA.state |
2290,7 → 2290,7 |
sysfn_deactivate: ; 18.1 = DEACTIVATE WINDOW |
cmp ecx, 2 |
jb .nowindowdeactivate |
cmp ecx, [TASK_COUNT] |
cmp ecx, [thread_count] |
ja .nowindowdeactivate |
movzx esi, word [WIN_STACK + ecx*2] |
2311,7 → 2311,7 |
sysfn_activate: ; 18.3 = ACTIVATE WINDOW |
cmp ecx, 2 |
jb .nowindowactivate |
cmp ecx, [TASK_COUNT] |
cmp ecx, [thread_count] |
ja .nowindowactivate |
;------------------------------------- |
@@: |
2329,7 → 2329,7 |
call wakeup_osloop |
movzx esi, word [WIN_STACK + ecx*2] |
cmp esi, [TASK_COUNT] |
cmp esi, [thread_count] |
je .nowindowactivate; already active |
mov edi, ecx |
2355,7 → 2355,7 |
jne @f |
mov edx, [CURRENT_TASK] |
@@: |
cmp edx, [TASK_COUNT] |
cmp edx, [thread_count] |
ja .fail |
cmp edx, 1 |
je .fail |
2428,7 → 2428,7 |
;------------------------------------------------------------------------------ |
align 4 |
sysfn_getactive: ; 18.7 = get active window |
mov eax, [TASK_COUNT] |
mov eax, [thread_count] |
movzx eax, word [WIN_POS + eax*2] |
mov [esp+32], eax |
ret |
3105,7 → 3105,7 |
; test main buffer |
mov ebx, [CURRENT_TASK] ; TOP OF WINDOW STACK |
movzx ecx, word [WIN_STACK + ebx * 2] |
mov edx, [TASK_COUNT] |
mov edx, [thread_count] |
cmp ecx, edx |
jne .finish |
cmp [KEY_COUNT], byte 0 |
3161,7 → 3161,7 |
mov ebx, [CURRENT_TASK] ; TOP OF WINDOW STACK |
mov [esp + 32], dword 1 |
movzx ecx, word [WIN_STACK + ebx * 2] |
mov edx, [TASK_COUNT] ; less than 256 processes |
mov edx, [thread_count] ; less than 256 processes |
cmp ecx, edx |
jne .exit |
movzx eax, byte [BTN_COUNT] |
3278,7 → 3278,7 |
.nofillbuf: |
; return number of processes |
mov eax, [TASK_COUNT] |
mov eax, [thread_count] |
mov [esp+32], eax |
ret |
3567,7 → 3567,7 |
xor edi, edi |
mov ebx, CURRENT_TASK |
mov ecx, [TASK_COUNT] |
mov ecx, [thread_count] |
movzx eax, word [WIN_POS + ecx*2] ; active window |
shl eax, 8 |
push eax |
3641,7 → 3641,7 |
;--------- set event 5 start ---------- |
push ecx edi |
xor edi, edi |
mov ecx, [TASK_COUNT] |
mov ecx, [thread_count] |
;-------------------------------------- |
align 4 |
set_bgr_event: |
3733,7 → 3733,7 |
;-------------------------------------- |
align 4 |
noshutdown: |
mov eax, [TASK_COUNT] ; termination |
mov eax, [thread_count] ; termination |
mov ebx, TASK_DATA+TASKDATA.state |
mov esi, 1 |
;-------------------------------------- |
3972,7 → 3972,7 |
not_this_task: |
pop ecx |
cmp ecx, [TASK_COUNT] |
cmp ecx, [thread_count] |
jle newdw2 |
pop eax |
/kernel/trunk/network/socket.inc |
---|
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 ;; |
;; ;; |
;; Part of the TCP/IP network stack for KolibriOS ;; |
1899,7 → 1899,7 |
je .found |
inc ecx |
add esi, sizeof.TASKDATA |
cmp ecx, [TASK_COUNT] |
cmp ecx, [thread_count] |
jbe .next |
.error2: |
/kernel/trunk/network/stack.inc |
---|
1,6 → 1,6 |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
;; ;; |
;; Copyright (C) KolibriOS team 2004-2019. All rights reserved. ;; |
;; Copyright (C) KolibriOS team 2004-2021. All rights reserved. ;; |
;; Distributed under terms of the GNU General Public License ;; |
;; ;; |
;; STACK.INC ;; |
434,7 → 434,7 |
; Send event to all applications |
push edi ecx |
mov edi, SLOT_BASE |
mov ecx, [TASK_COUNT] |
mov ecx, [thread_count] |
.loop: |
add edi, 256 |
or [edi + APPDATA.event_mask], EVENT_NETWORK2 |