Subversion Repositories Kolibri OS

Rev

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

Rev 6927 Rev 6928
Line 38... Line 38...
38
 
38
 
39
        test    edx, not O_CLOEXEC
39
        test    edx, not O_CLOEXEC
40
        mov     ebp, -EINVAL
40
        mov     ebp, -EINVAL
Line 41... Line -...
41
        jnz     .fail
-
 
42
 
41
        jnz     .fail
-
 
42
 
43
        push    ecx
43
        push    edx
Line 44... Line 44...
44
        push    edx
44
        push    ecx
45
        sub     esp, (5-2)*4
45
        sub     esp, (5-2)*4
46
 
46
 
Line 100... Line 100...
100
 
100
 
101
        mov     [edx+FILED.magic], 'PIPE'
101
        mov     [edx+FILED.magic], 'PIPE'
102
        mov     [edx+FILED.destroy], 0
102
        mov     [edx+FILED.destroy], 0
Line -... Line 103...
-
 
103
        mov     [edx+FILED.file], ebp
-
 
104
 
-
 
105
        mov     eax, [eax+FILED.handle]
103
        mov     [edx+FILED.file], ebp
106
        mov     edx, [edx+FILED.handle]
104
 
107
 
105
        mov     [ecx], eax
108
        mov     [ecx], eax
106
        mov     [ecx+4], edx
109
        mov     [ecx+4], edx
107
        add     esp, 5*4
110
        add     esp, 5*4
Line 218... Line 221...
218
.check_count:
221
.check_count:
219
        cmp     ecx, esi
222
        cmp     ecx, esi
220
        jb      .write
223
        jb      .write
221
        mov     ecx, esi
224
        mov     ecx, esi
222
.write:
225
.write:
-
 
226
        mov     esi, edi
223
        mov     esi, [ebp+PIPE.buffer]
227
        mov     edi, [ebp+PIPE.buffer]
224
        add     esi, [ebp+PIPE.write_end]
228
        add     edi, [ebp+PIPE.write_end]
225
        mov     [esp+SYSCALL_STACK._eax], ecx
229
        mov     [esp+SYSCALL_STACK._eax], ecx
226
        add     [ebp+PIPE.count], ecx
230
        add     [ebp+PIPE.count], ecx
227
        cld
231
        cld
228
        rep movsb
232
        rep movsb
229
        and     esi, 0xFFF
233
        and     edi, 0xFFF
230
        mov     [ebp+PIPE.write_end], esi
234
        mov     [ebp+PIPE.write_end], edi
Line 231... Line 235...
231
 
235
 
232
        lea     ecx, [ebp+PIPE.pipe_lock]
236
        lea     ecx, [ebp+PIPE.pipe_lock]
233
        call    mutex_unlock
237
        call    mutex_unlock