Subversion Repositories Kolibri OS

Rev

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

Rev 3539 Rev 3742
Line 3... Line 3...
3
;; Copyright (C) KolibriOS team 2004-2011. All rights reserved. ;;
3
;; Copyright (C) KolibriOS team 2004-2011. 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: 3539 $
8
$Revision: 3742 $
9
 
9
 
10
 
10
 
Line 40... Line 40...
40
 
40
 
41
reserve_cd_channel:
41
reserve_cd_channel:
42
        cmp     [ChannelNumber], 1
42
        cmp     [ChannelNumber], 1
43
        jne     .IDE_Channel_2
43
        jne     .IDE_Channel_2
44
.IDE_Channel_1:
-
 
45
        cli
-
 
46
        cmp     [IDE_Channel_1], 0
-
 
47
        je      .reserve_ok_1
44
.IDE_Channel_1:
48
        sti
-
 
49
        call    change_task
-
 
50
        jmp     .IDE_Channel_1
-
 
51
.IDE_Channel_2:
-
 
52
        cli
45
        pushad
53
        cmp     [IDE_Channel_2], 0
-
 
54
        je      .reserve_ok_2
-
 
55
        sti
46
        mov     ecx, ide_channel1_mutex
56
        call    change_task
-
 
57
        jmp     .IDE_Channel_2
-
 
58
.reserve_ok_1:
47
        call    mutex_lock
59
        mov     [IDE_Channel_1], 1
48
        mov     [IDE_Channel_1], 1
60
        sti
49
        popad
61
        ret
50
        ret
-
 
51
.IDE_Channel_2:
-
 
52
        pushad
-
 
53
        mov     ecx, ide_channel2_mutex
62
.reserve_ok_2:
54
        call    mutex_lock
63
        mov     [IDE_Channel_2], 1
55
        mov     [IDE_Channel_2], 1
64
        sti
56
        popad
Line 65... Line 57...
65
        ret
57
        ret
66
 
58
 
67
free_cd_channel:
59
free_cd_channel:
68
        cmp     [ChannelNumber], 1
60
        cmp     [ChannelNumber], 1
69
        jne     .IDE_Channel_2
61
        jne     .IDE_Channel_2
70
.IDE_Channel_1:
62
.IDE_Channel_1:
-
 
63
        mov     [IDE_Channel_1], 0
-
 
64
        pushad
-
 
65
        mov     ecx, ide_channel1_mutex
71
        mov     [IDE_Channel_1], 0
66
        call    mutex_unlock
72
        sti
67
        popad
73
        ret
68
        ret
74
.IDE_Channel_2:
69
.IDE_Channel_2:
-
 
70
        mov     [IDE_Channel_2], 0
-
 
71
        pushad
-
 
72
        mov     ecx, ide_channel2_mutex
75
        mov     [IDE_Channel_2], 0
73
        call    mutex_unlock
Line 76... Line 74...
76
        sti
74
        popad
77
        ret
75
        ret
78
 
76