Changeset 633 for trunk/kernel/kern
- Timestamp:
- May 28, 2019, 6:10:15 PM (6 years ago)
- Location:
- trunk/kernel/kern
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/kernel/kern/kernel_init.c
r632 r633 277 277 uint32_t x; // X cluster coordinate 278 278 uint32_t y; // Y cluster coordinate 279 uint32_t channels; // number of channels280 279 281 280 // get number of peripherals and base of devices array from boot_info … … 289 288 func = FUNC_FROM_TYPE( dev_tbl[i].type ); 290 289 impl = IMPL_FROM_TYPE( dev_tbl[i].type ); 291 channels = dev_tbl[i].channels;292 290 293 291 if (func == DEV_FUNC_TXT ) … … 587 585 // initialize the replicated chdev_dir[x][y] structures 588 586 // defining the extended pointers on chdev descriptors 589 xptr_t * entry ;587 xptr_t * entry = NULL; 590 588 591 589 if(func==DEV_FUNC_IOB ) entry = &chdev_dir.iob; … … 603 601 cxy_t cxy = HAL_CXY_FROM_XY( x , y ); 604 602 605 if( cluster_is_active( cxy ) )603 if( cluster_is_active( cxy ) && ( entry != NULL ) ) 606 604 { 607 605 hal_remote_s64( XPTR( cxy , entry ), -
trunk/kernel/kern/process.c
r629 r633 789 789 thread_t * this; // pointer on calling thread 790 790 uint32_t ltid; // index in process th_tbl[] 791 cxy_t owner_cxy; // target process owner cluster792 791 uint32_t count; // requests counter 793 792 volatile uint32_t ack_count; // acknowledges counter … … 807 806 assert( (LPID_FROM_PID( process->pid ) != 0 ), 808 807 "process %x is not an user process\n", process->pid ); 809 810 // get target process owner cluster811 owner_cxy = CXY_FROM_PID( process->pid );812 808 813 809 // get lock protecting process th_tbl[] … … 873 869 xptr_t client_xp ) 874 870 { 875 thread_t * this; // pointer on calling thread876 871 thread_t * target; // local pointer on target thread 877 872 xptr_t target_xp; // extended pointer on target thread … … 881 876 882 877 // get calling thread pointer 883 this = CURRENT_THREAD;884 878 885 879 // get target process owner cluster … … 887 881 888 882 #if DEBUG_PROCESS_SIGACTION 889 uint32_t cycle = (uint32_t)hal_get_cycles(); 883 thread_t * this = CURRENT_THREAD; 884 uint32_t cycle = (uint32_t)hal_get_cycles(); 890 885 if( DEBUG_PROCESS_SIGACTION < cycle ) 891 886 printk("\n[%s] thread[%x,%x] enter for process %x n cluster %x / cycle %d\n", … … 937 932 { 938 933 thread_t * target; // pointer on target thead 939 thread_t * this; // pointer on calling thread940 934 uint32_t ltid; // index in process th_tbl 941 935 uint32_t count; // requests counter 942 936 943 // get calling thread pointer944 this = CURRENT_THREAD;945 946 937 #if DEBUG_PROCESS_SIGACTION 947 pid_t pid = process->pid; 948 uint32_t cycle = (uint32_t)hal_get_cycles(); 938 thread_t * this = CURRENT_THREAD; 939 pid_t pid = process->pid; 940 uint32_t cycle = (uint32_t)hal_get_cycles(); 949 941 if( DEBUG_PROCESS_SIGACTION < cycle ) 950 942 printk("\n[%s] thread[%x,%x] enter for process %x in cluster %x / cycle %d\n", -
trunk/kernel/kern/thread.c
r629 r633 1082 1082 ltid_t target_ltid; // target thread local index 1083 1083 xptr_t joining_xp; // extended pointer on joining thread 1084 thread_t * joining_ptr; // pointer on joining thread1085 cxy_t joining_cxy; // joining thread cluster1086 1084 1087 1085 // get target thread cluster and local pointer … … 1143 1141 // get extended pointer on joining thread 1144 1142 joining_xp = (xptr_t)hal_remote_l64( target_join_xp_xp ); 1145 joining_ptr = GET_PTR( joining_xp );1146 joining_cxy = GET_CXY( joining_xp );1147 1143 1148 1144 // reset the join_done flag in target thread
Note: See TracChangeset
for help on using the changeset viewer.