Subversion Repositories Kolibri OS

Rev

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

Rev 3615 Rev 3617
Line 3... Line 3...
3
;; Copyright (C) KolibriOS team 2004-2012. All rights reserved. ;;
3
;; Copyright (C) KolibriOS team 2004-2012. All rights reserved. ;;
4
;; Copyright (C) MenuetOS 2000-2004 Ville Mikael Turjanmaa      ;;
4
;; Copyright (C) MenuetOS 2000-2004 Ville Mikael Turjanmaa      ;;
5
;; Distributed under terms of the GNU General Public License    ;;
5
;; Distributed under terms of the GNU General Public License    ;;
6
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
6
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
Line 7... Line 7...
7
 
7
 
Line 8... Line 8...
8
$Revision: 3615 $
8
$Revision: 3617 $
9
 
9
 
10
 
10
 
Line 390... Line 390...
390
@@:
390
@@:
391
        mov     [ebx+APPDATA.wait_param], eax  ; retval for wait
391
        mov     [ebx+APPDATA.wait_param], eax  ; retval for wait
392
        mov     [edi+TASKDATA.state], 0
392
        mov     [edi+TASKDATA.state], 0
393
.task_found:
393
.task_found:
394
        mov     [scheduler_current+ecx*4], ebx
394
        mov     [scheduler_current+ecx*4], ebx
-
 
395
; If we have selected a thread with higher priority
-
 
396
; AND rescheduling is due to IRQ,
-
 
397
; turn the current scheduler list one entry back,
-
 
398
; so the current thread will be next after high-priority thread is done.
-
 
399
        mov     ecx, [esp]
-
 
400
        cmp     ecx, NR_SCHED_QUEUES
-
 
401
        jz      .unlock_found
-
 
402
        mov     eax, [current_slot]
-
 
403
        mov     eax, [eax+APPDATA.in_schedule.prev]
-
 
404
        mov     [scheduler_current+ecx*4], eax
395
.unlock_found:
405
.unlock_found:
396
        pop     ecx
406
        pop     ecx
397
        spin_unlock_irqrestore SchedulerLock
407
        spin_unlock_irqrestore SchedulerLock
398
.found:
408
.found:
399
        mov     [CURRENT_TASK], bh
409
        mov     [CURRENT_TASK], bh