Subversion Repositories Kolibri OS

Rev

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

Rev 2455 Rev 3534
Line 3... Line 3...
3
;; Copyright (C) KolibriOS team 2012. All rights reserved.      ;;
3
;; Copyright (C) KolibriOS team 2012. 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: 2455 $
8
$Revision: 3534 $
9
 
9
 
Line 10... Line 10...
10
; Simple implementation of timers. All timers are organized in a double-linked
10
; Simple implementation of timers. All timers are organized in a double-linked
Line 201... Line 201...
201
.done:
201
.done:
202
; 3. Release the lock.
202
; 3. Release the lock.
203
        call    unlock_timer_list
203
        call    unlock_timer_list
204
; 4. Return.
204
; 4. Return.
205
        ret
205
        ret
-
 
206
 
-
 
207
; This is a simplified version of check_timers that does not call anything,
-
 
208
; just checks whether check_timers should do something.
-
 
209
proc check_timers_has_work?
-
 
210
        pushf
-
 
211
        cli
-
 
212
        mov     eax, [timer_list+TIMER.Next]
-
 
213
.loop:
-
 
214
        cmp     eax, timer_list
-
 
215
        jz      .done_nowork
-
 
216
        mov     edx, [timer_ticks]
-
 
217
        sub     edx, [eax+TIMER.Time]
-
 
218
        jns     .done_haswork
-
 
219
        mov     eax, [eax+TIMER.Next]
-
 
220
        jmp     .loop
-
 
221
.done_nowork:
-
 
222
        popf
-
 
223
        xor     eax, eax
-
 
224
        ret
-
 
225
.done_haswork:
-
 
226
        popf
-
 
227
        xor     eax, eax
-
 
228
        inc     eax
-
 
229
        ret
-
 
230
endp