- Timestamp:
- Aug 4, 2015, 11:23:30 AM (9 years ago)
- Location:
- soft/giet_vm/giet_kernel
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
soft/giet_vm/giet_kernel/kernel_init.c
r656 r688 1 /////////////////////////////////////////////////////////////////////////////////// 1 //////////////////////////////////////////////////////////////////////////////////// 2 2 // File : kernel_init.c 3 3 // Date : 26/05/2012 -
soft/giet_vm/giet_kernel/sys_handler.c
r670 r688 142 142 &_sys_tty_read, /* 0x03 */ 143 143 &_sys_tty_alloc, /* 0x04 */ 144 &_sys_ ukn,/* 0x05 */144 &_sys_tasks_status, /* 0x05 */ 145 145 &_sys_ukn, /* 0x06 */ 146 146 &_sys_heap_info, /* 0x07 */ … … 2237 2237 2238 2238 2239 /////////////////////// 2240 int _sys_tasks_status() 2241 { 2242 mapping_header_t * header = (mapping_header_t *)SEG_BOOT_MAPPING_BASE; 2243 mapping_task_t * task = _get_task_base(header); 2244 mapping_vspace_t * vspace = _get_vspace_base(header); 2245 mapping_cluster_t * cluster = _get_cluster_base(header); 2246 2247 unsigned int task_id; 2248 unsigned int vspace_id; 2249 2250 // scan all vspaces 2251 for( vspace_id = 0 ; vspace_id < header->vspaces ; vspace_id++ ) 2252 { 2253 _printf("\n*** vspace %s\n", vspace[vspace_id].name ); 2254 2255 // scan all tasks in vspace 2256 unsigned int min = vspace[vspace_id].task_offset ; 2257 unsigned int max = min + vspace[vspace_id].tasks ; 2258 for ( task_id = min ; task_id < max ; task_id++ ) 2259 { 2260 unsigned int clusterid = task[task_id].clusterid; 2261 unsigned int p = task[task_id].proclocid; 2262 unsigned int x = cluster[clusterid].x; 2263 unsigned int y = cluster[clusterid].y; 2264 unsigned int ltid = task[task_id].ltid; 2265 static_scheduler_t* psched = (static_scheduler_t*)_schedulers[x][y][p]; 2266 unsigned int norun = psched->context[ltid][CTX_NORUN_ID]; 2267 unsigned int current = psched->current; 2268 2269 if ( current == ltid ) 2270 _printf(" - task %s on P[%d,%d,%d] : running\n", task[task_id].name, x, y, p ); 2271 else if ( norun == 0 ) 2272 _printf(" - task %s on P[%d,%d,%d] : waiting\n", task[task_id].name, x, y, p ); 2273 else 2274 _printf(" - task %s on P[%d,%d,%d] : blocked\n", task[task_id].name, x, y, p ); 2275 } 2276 } 2277 return 0; 2278 } // end _sys_tasks_status() 2279 2280 2281 2239 2282 // Local Variables: 2240 2283 // tab-width: 4 -
soft/giet_vm/giet_kernel/sys_handler.h
r670 r688 231 231 unsigned int y ); 232 232 233 int _sys_tasks_status(); 234 233 235 #endif 234 236
Note: See TracChangeset
for help on using the changeset viewer.