Rev 3232 | Rev 3555 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 3232 | Rev 3500 | ||
---|---|---|---|
Line 148... | Line 148... | ||
148 | ; 0 if media is not inserted, nonzero otherwise. |
148 | ; 0 if media is not inserted, nonzero otherwise. |
149 | MediaUsed db ? |
149 | MediaUsed db ? |
150 | ; 0 if media fields are not used, nonzero otherwise. If .MediaRefCount is |
150 | ; 0 if media fields are not used, nonzero otherwise. If .MediaRefCount is |
151 | ; nonzero, this field is nonzero too; however, when .MediaRefCount goes |
151 | ; nonzero, this field is nonzero too; however, when .MediaRefCount goes |
152 | ; to zero, there is some time interval during which media object is still used. |
152 | ; to zero, there is some time interval during which media object is still used. |
153 | align 4 |
153 | dw ? ; padding |
154 | ; The following fields are not valid unless either .MediaInserted is nonzero |
154 | ; The following fields are not valid unless either .MediaInserted is nonzero |
155 | ; or they are accessed from a code which has obtained the reference when |
155 | ; or they are accessed from a code which has obtained the reference when |
156 | ; .MediaInserted was nonzero. |
156 | ; .MediaInserted was nonzero. |
157 | MediaRefCount dd ? |
157 | MediaRefCount dd ? |
158 | ; Count of active references to the media object. One reference is kept during |
158 | ; Count of active references to the media object. One reference is kept during |
Line 379... | Line 379... | ||
379 | ; Media is not inserted, reference counter is 1. |
379 | ; Media is not inserted, reference counter is 1. |
380 | lea ecx, [esi+DISK.MediaLock] |
380 | lea ecx, [esi+DISK.MediaLock] |
381 | call mutex_init |
381 | call mutex_init |
382 | xor eax, eax |
382 | xor eax, eax |
383 | mov dword [esi+DISK.MediaInserted], eax |
383 | mov dword [esi+DISK.MediaInserted], eax |
- | 384 | mov [esi+DISK.MediaRefCount], eax |
|
384 | inc eax |
385 | inc eax |
385 | mov [esi+DISK.RefCount], eax |
386 | mov [esi+DISK.RefCount], eax |
386 | ; The DISK structure is initialized. |
387 | ; The DISK structure is initialized. |
387 | ; 5. Insert the new structure to the global list. |
388 | ; 5. Insert the new structure to the global list. |
388 | ; 5a. Acquire the mutex. |
389 | ; 5a. Acquire the mutex. |