Rev 2486 | Rev 2500 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 2486 | Rev 2489 | ||
---|---|---|---|
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 | ;; 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: 2486 $ |
8 | $Revision: 2489 $ |
9 | 9 | ||
Line 436... | Line 436... | ||
436 | test eax, eax |
436 | test eax, eax |
437 | jz .cleanup |
437 | jz .cleanup |
Line 438... | Line 438... | ||
438 | 438 | ||
Line 439... | Line -... | ||
439 | mov [file2], eax |
- | |
440 | - | ||
441 | push eax |
- | |
442 | .wait_lock: |
- | |
443 | cmp [unpack_mutex], 0 |
- | |
444 | je .get_lock |
- | |
445 | call change_task |
- | |
446 | jmp .wait_lock |
- | |
447 | - | ||
448 | .get_lock: |
439 | mov [file2], eax |
449 | mov eax, 1 |
- | |
450 | xchg eax, [unpack_mutex] |
440 | |
451 | test eax, eax |
- | |
Line 452... | Line 441... | ||
452 | jnz .wait_lock |
441 | mov ecx, unpack_mutex |
Line 453... | Line 442... | ||
453 | pop eax |
442 | call mutex_lock |
Line 454... | Line 443... | ||
454 | 443 | ||
455 | stdcall unpack, [file], eax |
444 | stdcall unpack, [file], eax |
456 | 445 | ||
457 | mov [unpack_mutex], 0 |
446 | call mutex_unlock |
Line 483... | Line 472... | ||
483 | pop edi |
472 | pop edi |
484 | pop esi |
473 | pop esi |
485 | ret |
474 | ret |
486 | endp |
475 | endp |
Line 487... | Line 476... | ||
487 | 476 | ||
488 | iglobal |
477 | uglobal |
489 | align 4 |
478 | align 4 |
490 | unpack_mutex dd 0 |
479 | unpack_mutex MUTEX |
Line 491... | Line 480... | ||
491 | endg |
480 | endg |
492 | 481 |