Subversion Repositories Kolibri OS

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
5602 serge 1
format MS COFF
2
use32
3
 
4
MUTEX.lock      equ 0
5
MUTEX.handle    equ 4
6
 
7
section '.text' align 16 code readable executable
8
 
9
public @mutex_unlock@4
10
 
11
@mutex_unlock@4:
12
        xor     eax, eax
13
        xchg    eax, [ecx]
14
        cmp     eax, 1
15
        jnz     .wake
16
 
17
        ret
18
.wake:
19
        push    ebx
20
        mov     edx, 1
21
        mov     ecx, [ecx+MUTEX.handle]
22
        mov     ebx, 3
23
        mov     eax, 77
24
        int     0x40
25
        pop     ebx
26
        retn