Subversion Repositories Kolibri OS

Rev

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

Rev 273 Rev 276
Line 308... Line 308...
308
             img_pages   dd ?
308
             img_pages   dd ?
309
             dir_addr    dd ?
309
             dir_addr    dd ?
310
             app_tabs    dd ?
310
             app_tabs    dd ?
311
           endl
311
           endl
Line 312... Line 312...
312
 
312
 
-
 
313
           mov ebx, pg_data.pg_mutex
Line 313... Line 314...
313
           stdcall wait_mutex, pg_data.pg_mutex
314
           call wait_mutex   ;ebx
314
 
315
 
Line 315... Line 316...
315
           xor eax, eax
316
           xor eax, eax
Line 489... Line 490...
489
endp
490
endp
Line 490... Line 491...
490
 
491
 
491
align 4
492
align 4
Line 492... Line 493...
492
proc destroy_app_space stdcall, pg_dir:dword
493
proc destroy_app_space stdcall, pg_dir:dword
-
 
494
 
Line 493... Line 495...
493
 
495
           mov ebx, pg_data.pg_mutex
494
           stdcall wait_mutex, pg_data.pg_mutex
496
           call wait_mutex   ;ebx
495
 
497
 
Line 569... Line 571...
569
           mov [cmdline], ebx
571
           mov [cmdline], ebx
570
           mov [flags], edx
572
           mov [flags], edx
571
           mov eax, [ebp]
573
           mov eax, [ebp]
572
           mov [filename], eax
574
           mov [filename], eax
Line 573... Line 575...
573
 
575
 
-
 
576
           mov ebx, pg_data.tmp_task_mutex
Line 574... Line 577...
574
           stdcall wait_mutex, pg_data.tmp_task_mutex
577
           call wait_mutex   ;ebx
575
 
578
 
576
           mov edi, [tmp_task_data]
579
           mov edi, [tmp_task_data]
577
           mov ecx, (1024+256)/4
580
           mov ecx, (1024+256)/4
Line 939... Line 942...
939
           mov    [application_table_status],0
942
           mov    [application_table_status],0
940
           mov    eax,-1
943
           mov    eax,-1
941
           ret
944
           ret
942
endp
945
endp
Line -... Line 946...
-
 
946
 
-
 
947
; param
-
 
948
;  ebx=mutex
943
 
949
 
944
align 4
950
align 4
945
proc wait_mutex stdcall, mutex:dword
951
wait_mutex:
946
           mov ebx, [mutex]
952
           push eax
947
.wait_lock:
953
           push ebx
948
           cmp dword [ebx],0
954
           cmp dword [ebx],0
949
           je .get_lock
-
 
950
           push ebx
955
           je .get_lock
951
           call change_task
-
 
952
           pop ebx
956
           call change_task
953
           jmp .wait_lock
-
 
954
 
957
           jmp wait_mutex
955
.get_lock:
958
.get_lock:
956
           mov eax, 1
959
           mov eax, 1
957
           xchg eax, [ebx]
960
           xchg eax, [ebx]
958
           test eax, eax
961
           test eax, eax
-
 
962
           jnz wait_mutex
-
 
963
           pop ebx
959
           jnz .wait_lock
964
           pop eax
960
           ret
-
 
Line 961... Line 965...
961
endp
965
           ret
962
 
966
 
963
align 4
967
align 4