Subversion Repositories Kolibri OS

Rev

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

Rev 379 Rev 380
Line 456... Line 456...
456
           mov [new_size], edi
456
           mov [new_size], edi
457
 
457
 
Line 458... Line 458...
458
           mov edx,[CURRENT_TASK]
458
           mov edx,[CURRENT_TASK]
459
           shl edx,8
459
           shl edx,8
460
           cmp [PROC_BASE+APPDATA.heap_base+edx],0
460
           cmp [SLOT_BASE+APPDATA.heap_base+edx],0
461
           jne .exit
461
           jne .exit
Line 462... Line 462...
462
 
462
 
463
           mov esi, [PROC_BASE+APPDATA.mem_size+edx]
463
           mov esi, [SLOT_BASE+APPDATA.mem_size+edx]
464
           add esi, 4095
464
           add esi, 4095
Line 465... Line 465...
465
           and esi, not 4095
465
           and esi, not 4095
466
 
466
 
Line 560... Line 560...
560
; in: edx = slot shl 8
560
; in: edx = slot shl 8
561
;     ebx = new memory size
561
;     ebx = new memory size
562
; destroys eax,ecx,edx
562
; destroys eax,ecx,edx
563
 
563
 
Line 564... Line 564...
564
           mov    [PROC_BASE+APPDATA.mem_size+edx],ebx
564
           mov    [SLOT_BASE+APPDATA.mem_size+edx],ebx
565
;search threads and update
565
;search threads and update
566
;application memory size infomation
566
;application memory size infomation
567
           mov    ecx,[PROC_BASE+APPDATA.dir_table+edx]
567
           mov    ecx,[SLOT_BASE+APPDATA.dir_table+edx]
568
           mov    eax,2
568
           mov    eax,2
Line 569... Line 569...
569
 
569
 
570
.search_threads:
570
.search_threads:
571
;eax = current slot
571
;eax = current slot
Line 577... Line 577...
577
           shl    edx,5
577
           shl    edx,5
578
           cmp    word [CURRENT_TASK+edx+TASKDATA.state],9 ;if slot empty?
578
           cmp    word [CURRENT_TASK+edx+TASKDATA.state],9 ;if slot empty?
579
           jz     .search_threads_next
579
           jz     .search_threads_next
580
           shl    edx,3
580
           shl    edx,3
581
           cmp    [PROC_BASE+edx+APPDATA.dir_table],ecx     ;if it is our thread?
581
           cmp    [SLOT_BASE+edx+APPDATA.dir_table],ecx     ;if it is our thread?
582
           jnz    .search_threads_next
582
           jnz    .search_threads_next
583
           mov    [PROC_BASE+edx+APPDATA.mem_size],ebx     ;update memory size
583
           mov    [SLOT_BASE+edx+APPDATA.mem_size],ebx     ;update memory size
584
.search_threads_next:
584
.search_threads_next:
585
           inc    eax
585
           inc    eax
586
           jmp    .search_threads
586
           jmp    .search_threads
587
.search_threads_end:
587
.search_threads_end:
588
           ret
588
           ret
589
 
589
 
Line 836... Line 836...
836
proc set_ipc_buff
836
proc set_ipc_buff
837
 
837
 
Line 838... Line 838...
838
           mov  eax,[CURRENT_TASK]
838
           mov  eax,[CURRENT_TASK]
839
           shl  eax,8
839
           shl  eax,8
840
           add  eax, PROC_BASE
840
           add  eax, SLOT_BASE
841
           pushf
841
           pushf
842
           cli
842
           cli
843
           mov  [eax+0xA0],ebx     ;set fields in extended information area
843
           mov  [eax+0xA0],ebx     ;set fields in extended information area
844
           mov  [eax+0xA4],ecx
844
           mov  [eax+0xA4],ecx
Line 874... Line 874...
874
           jz   .no_pid
874
           jz   .no_pid
875
 
875
 
Line 876... Line 876...
876
           mov [dst_slot], eax
876
           mov [dst_slot], eax
877
           shl  eax,8
877
           shl  eax,8
878
           mov  edi,[eax+PROC_BASE+0xa0]  ;is ipc area defined?
878
           mov  edi,[eax+SLOT_BASE+0xa0]  ;is ipc area defined?
879
           test edi,edi
879
           test edi,edi
880
           jz   .no_ipc_area
880
           jz   .no_ipc_area
Line 881... Line 881...
881
 
881
 
882
           mov ebx, edi
882
           mov ebx, edi
883
           add edi, new_app_base
883
           add edi, new_app_base
884
           and ebx, 0xFFF
884
           and ebx, 0xFFF
Line 885... Line 885...
885
           mov [dst_offset], ebx
885
           mov [dst_offset], ebx
886
 
886
 
Line 887... Line 887...
887
           mov esi, [eax+PROC_BASE+0xa4]
887
           mov esi, [eax+SLOT_BASE+0xa4]
888
           mov [buf_size], esi
888
           mov [buf_size], esi
Line 889... Line 889...
889
 
889
 
890
           stdcall map_mem, [ipc_tmp], [PROC_BASE+eax+0xB8],\
890
           stdcall map_mem, [ipc_tmp], [SLOT_BASE+eax+0xB8],\
891
                             edi, esi
891
                             edi, esi
Line 940... Line 940...
940
           invlpg [edx]
940
           invlpg [edx]
941
 
941
 
Line 942... Line 942...
942
           mov  eax, [dst_slot]
942
           mov  eax, [dst_slot]
943
           shl eax, 8
943
           shl eax, 8
944
           or   [eax+PROC_BASE+0xA8],dword 0x40
944
           or   [eax+SLOT_BASE+0xA8],dword 0x40
945
           cmp  dword [check_idle_semaphore],20
945
           cmp  dword [check_idle_semaphore],20
946
           jge  .ipc_no_cis
946
           jge  .ipc_no_cis
Line 947... Line 947...
947
 
947
 
948
           mov  dword [check_idle_semaphore],5
948
           mov  dword [check_idle_semaphore],5
Line 1037... Line 1037...
1037
           cmp eax, 15
1037
           cmp eax, 15
1038
           ja @f
1038
           ja @f
1039
           mov ecx, [CURRENT_TASK]
1039
           mov ecx, [CURRENT_TASK]
1040
           shl ecx, 8
1040
           shl ecx, 8
1041
           mov eax, [ecx+PROC_BASE+APPDATA.fpu_handler]
1041
           mov eax, [ecx+SLOT_BASE+APPDATA.fpu_handler]
1042
           mov [ecx+PROC_BASE+APPDATA.fpu_handler], ebx
1042
           mov [ecx+SLOT_BASE+APPDATA.fpu_handler], ebx
1043
           mov [esp+36], eax
1043
           mov [esp+36], eax
1044
           ret
1044
           ret
1045
@@:
1045
@@:
1046
           cmp eax, 16
1046
           cmp eax, 16
1047
           ja @f
1047
           ja @f
1048
 
1048
 
Line 1064... Line 1064...
1064
           cmp eax, 18
1064
           cmp eax, 18
1065
           ja @f
1065
           ja @f
1066
           mov ecx, [CURRENT_TASK]
1066
           mov ecx, [CURRENT_TASK]
1067
           shl ecx, 8
1067
           shl ecx, 8
1068
           mov eax, [ecx+PROC_BASE+APPDATA.sse_handler]
1068
           mov eax, [ecx+SLOT_BASE+APPDATA.sse_handler]
1069
           mov [ecx+PROC_BASE+APPDATA.sse_handler], ebx
1069
           mov [ecx+SLOT_BASE+APPDATA.sse_handler], ebx
1070
           mov [esp+36], eax
1070
           mov [esp+36], eax
1071
           ret
1071
           ret
1072
@@:
1072
@@:
1073
           cmp eax, 19
1073
           cmp eax, 19
1074
           ja .fail
1074
           ja .fail
1075
           add ebx, new_app_base
1075
           add ebx, new_app_base