Subversion Repositories Kolibri OS

Rev

Rev 8867 | Rev 8874 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 8867 Rev 8869
Line 3... Line 3...
3
;; Copyright (C) KolibriOS team 2004-2021. All rights reserved. ;;
3
;; Copyright (C) KolibriOS team 2004-2021. All rights reserved. ;;
4
;;  Distributed under terms of the GNU General Public License.  ;;
4
;;  Distributed under terms of the GNU General Public License.  ;;
5
;;                                                              ;;
5
;;                                                              ;;
6
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
6
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
Line 7... Line 7...
7
 
7
 
Line 8... Line 8...
8
$Revision: 8867 $
8
$Revision: 8869 $
Line 9... Line 9...
9
 
9
 
Line 492... Line 492...
492
 
492
 
493
.loop:
493
.loop:
494
;ecx = offset of current process info entry
494
;ecx = offset of current process info entry
495
;ebx = maximum permitted offset
495
;ebx = maximum permitted offset
496
        ; state 9 means "not used"
496
        ; state 9 means "not used"
497
        cmp     byte [TASK_TABLE+ecx+TASKDATA.state], 9
497
        cmp     byte [TASK_TABLE+ecx+TASKDATA.state], TSTATE_FREE
498
        jz      .endloop ;skip empty slots
498
        jz      .endloop ;skip empty slots
499
        cmp     [TASK_TABLE+ecx+TASKDATA.pid], eax;check PID
499
        cmp     [TASK_TABLE+ecx+TASKDATA.pid], eax;check PID
500
        jz      .pid_found
500
        jz      .pid_found
501
.endloop:
501
.endloop:
Line 968... Line 968...
968
        mov     edi, eax
968
        mov     edi, eax
969
        mov     [ebx+SLOT_BASE+APPDATA.cur_dir], eax
969
        mov     [ebx+SLOT_BASE+APPDATA.cur_dir], eax
970
        rep movsd
970
        rep movsd
Line 971... Line 971...
971
 
971
 
972
        shr     ebx, 3
972
        shr     ebx, 3
Line 973... Line 973...
973
        mov     dword [CURRENT_TASK+ebx+0x10], 0
973
        mov     dword [TASK_TABLE+ebx+TASKDATA.mem_start], 0
974
 
974
 
975
        mov     ebx, [slot]
975
        mov     ebx, [slot]
976
        mov     eax, ebx
976
        mov     eax, ebx
Line 977... Line 977...
977
        shl     ebx, 5
977
        shl     ebx, 5
978
        lea     ecx, [draw_data+ebx];ecx - pointer to draw data
978
        lea     ecx, [draw_data+ebx];ecx - pointer to draw data
979
 
979
 
980
; set window state to 'normal' (non-minimized/maximized/rolled-up) state
980
; set window state to 'normal' (non-minimized/maximized/rolled-up) state
981
        mov     [ebx+window_data+WDATA.fl_wstate], WSTATE_NORMAL
981
        mov     [ebx+window_data+WDATA.fl_wstate], WSTATE_NORMAL
Line 982... Line 982...
982
        mov     [ebx+window_data+WDATA.fl_redraw], 1
982
        mov     [ebx+window_data+WDATA.fl_redraw], 1
Line 983... Line 983...
983
        add     ebx, CURRENT_TASK     ;ebx - pointer to information about process
983
        add     ebx, TASK_TABLE     ;ebx - pointer to information about process
Line 1037... Line 1037...
1037
 
1037
 
1038
        xor     edx, edx; process state - running
1038
        xor     edx, edx; process state - running
1039
; set if debuggee
1039
; set if debuggee
1040
        test    byte [flags], 1
1040
        test    byte [flags], 1
1041
        jz      .no_debug
1041
        jz      .no_debug
1042
        mov     eax, [CURRENT_TASK]
1042
        mov     eax, [current_slot_idx]
1043
        mov     [SLOT_BASE+ebx*8+APPDATA.debugger_slot], eax
1043
        mov     [SLOT_BASE+ebx*8+APPDATA.debugger_slot], eax
1044
.no_debug:
1044
.no_debug:
1045
        mov     [CURRENT_TASK+ebx+TASKDATA.state], dl
1045
        mov     [TASK_TABLE+ebx+TASKDATA.state], dl
1046
        lea     edx, [SLOT_BASE+ebx*8]
1046
        lea     edx, [SLOT_BASE+ebx*8]
1047
        call    scheduler_add_thread
1047
        call    scheduler_add_thread
1048
        ret
1048
        ret