Subversion Repositories Kolibri OS

Rev

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

Rev 8051 Rev 8093
Line 3... Line 3...
3
;; Copyright (C) KolibriOS team 2004-2020. All rights reserved. ;;
3
;; Copyright (C) KolibriOS team 2004-2020. 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: 8051 $
8
$Revision: 8093 $
9
 
9
 
10
align 4 ;3A08
10
align 4 ;3A08
11
build_interrupt_table:
11
build_interrupt_table:
Line 465... Line 465...
465
        mov     esi, [.slot]
465
        mov     esi, [.slot]
466
        cmp     [fpu_owner], esi ; if user fpu last -> fpu user = 2
466
        cmp     [fpu_owner], esi ; if user fpu last -> fpu user = 2
467
        jne     @F
467
        jne     @F
Line 468... Line 468...
468
 
468
 
469
        mov     [fpu_owner], 2
469
        mov     [fpu_owner], 2
470
        mov     eax, [256*2+SLOT_BASE+APPDATA.fpu_state]
470
        mov     eax, [sizeof.APPDATA*2+SLOT_BASE+APPDATA.fpu_state]
471
        clts
471
        clts
472
        bt      [cpu_caps], CAPS_SSE
472
        bt      [cpu_caps], CAPS_SSE
473
        jnc     .no_SSE
473
        jnc     .no_SSE
474
        fxrstor [eax]
474
        fxrstor [eax]
Line 609... Line 609...
609
        mov     edi, [.slot]
609
        mov     edi, [.slot]
610
        shl     edi, 8
610
        shl     edi, 8
611
        add     edi, SLOT_BASE
611
        add     edi, SLOT_BASE
Line 612... Line 612...
612
 
612
 
613
        mov     eax, [edi+APPDATA.io_map]
613
        mov     eax, [edi+APPDATA.io_map]
614
        cmp     eax, [SLOT_BASE+256+APPDATA.io_map]
614
        cmp     eax, [SLOT_BASE+sizeof.APPDATA+APPDATA.io_map]
615
        je      @F
615
        je      @F
616
        call    free_page
616
        call    free_page
617
@@:
617
@@:
618
        mov     eax, [edi+APPDATA.io_map+4]
618
        mov     eax, [edi+APPDATA.io_map+4]
619
        cmp     eax, [SLOT_BASE+256+APPDATA.io_map+4]
619
        cmp     eax, [SLOT_BASE+sizeof.APPDATA+APPDATA.io_map+4]
620
        je      @F
620
        je      @F
621
        call    free_page
621
        call    free_page
622
@@:
622
@@:
623
        lea     ebx, [edi+APPDATA.list]
623
        lea     ebx, [edi+APPDATA.list]
Line 820... Line 820...
820
        jz      sys_end
820
        jz      sys_end
821
; Otherwise, return to the caller.
821
; Otherwise, return to the caller.
822
        ret
822
        ret
823
endp
823
endp
Line 824... Line 824...
824
 
824
 
825
; Request termination of thread identified by edx = SLOT_BASE + slot*256.
825
; Request termination of thread identified by edx = SLOT_BASE + slot*sizeof.APPDATA.
826
; Called by anyone.
826
; Called by anyone.
827
proc request_terminate
827
proc request_terminate
828
        xor     eax, eax        ; set return value
828
        xor     eax, eax        ; set return value
829
; Atomically clear the upper bit. If it was already zero, then
829
; Atomically clear the upper bit. If it was already zero, then