Rev 4273 | Rev 5089 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 4273 | Rev 4437 | ||
---|---|---|---|
Line 1... | Line 1... | ||
1 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
1 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
2 | ;; ;; |
2 | ;; ;; |
3 | ;; Copyright (C) KolibriOS team 2011-2012. All rights reserved. ;; |
3 | ;; Copyright (C) KolibriOS team 2011-2014. 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: 4273 $ |
8 | $Revision: 4437 $ |
9 | 9 | ||
10 | ; ============================================================================= |
10 | ; ============================================================================= |
11 | ; ================================= Constants ================================= |
11 | ; ================================= Constants ================================= |
12 | ; ============================================================================= |
12 | ; ============================================================================= |
13 | ; Error codes for callback functions. |
13 | ; Error codes for callback functions. |
14 | DISK_STATUS_OK = 0 ; success |
14 | DISK_STATUS_OK = 0 ; success |
15 | DISK_STATUS_GENERAL_ERROR = -1; if no other code is suitable |
15 | DISK_STATUS_GENERAL_ERROR = -1; if no other code is suitable |
16 | DISK_STATUS_INVALID_CALL = 1 ; invalid input parameters |
16 | DISK_STATUS_INVALID_CALL = 1 ; invalid input parameters |
- | 17 | DISK_STATUS_NO_MEDIA = 2 ; no media present |
|
17 | DISK_STATUS_NO_MEDIA = 2 ; no media present |
18 | DISK_STATUS_END_OF_MEDIA = 3 ; end of media while reading/writing data |
18 | DISK_STATUS_END_OF_MEDIA = 3 ; end of media while reading/writing data |
19 | DISK_STATUS_NO_MEMORY = 4 ; insufficient memory for driver operation |
19 | ; Driver flags. Represent bits in DISK.DriverFlags. |
20 | ; Driver flags. Represent bits in DISK.DriverFlags. |
20 | DISK_NO_INSERT_NOTIFICATION = 1 |
21 | DISK_NO_INSERT_NOTIFICATION = 1 |
Line 99... | Line 100... | ||
99 | 100 | ||
100 | ; This structure represents the disk cache. To follow the old implementation, |
101 | ; This structure represents the disk cache. To follow the old implementation, |
101 | ; there are two distinct caches for a disk, one for "system" data,and the other |
102 | ; there are two distinct caches for a disk, one for "system" data,and the other |
102 | ; for "application" data. |
103 | ; for "application" data. |
103 | struct DISKCACHE |
- | |
104 | mutex MUTEX |
- | |
105 | ; Lock to protect the cache. |
104 | struct DISKCACHE |
106 | ; The following fields are inherited from data32.inc:cache_ideX. |
105 | ; The following fields are inherited from data32.inc:cache_ideX. |
107 | pointer dd ? |
106 | pointer dd ? |
108 | data_size dd ? ; unused |
107 | data_size dd ? ; unused |
109 | data dd ? |
108 | data dd ? |
Line 167... | Line 166... | ||
167 | ; Number of partitions on this media. |
166 | ; Number of partitions on this media. |
168 | Partitions dd ? |
167 | Partitions dd ? |
169 | ; Pointer to array of .NumPartitions pointers to PARTITION structures. |
168 | ; Pointer to array of .NumPartitions pointers to PARTITION structures. |
170 | cache_size dd ? |
169 | cache_size dd ? |
171 | ; inherited from cache_ideX_size |
170 | ; inherited from cache_ideX_size |
- | 171 | CacheLock MUTEX |
|
- | 172 | ; Lock to protect both caches. |
|
172 | SysCache DISKCACHE |
173 | SysCache DISKCACHE |
173 | AppCache DISKCACHE |
174 | AppCache DISKCACHE |
174 | ; Two caches for the disk. |
175 | ; Two caches for the disk. |
175 | ends |
176 | ends |