Changeset 428 for trunk/kernel/kern/rpc.c
- Timestamp:
- Jan 29, 2018, 6:08:07 PM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/kernel/kern/rpc.c
r416 r428 79 79 &rpc_sched_display_server, // 27 80 80 &rpc_vmm_set_cow_server, // 28 81 &rpc_ undefined,// 2981 &rpc_vmm_display_server, // 29 82 82 }; 83 83 … … 85 85 void __attribute__((noinline)) rpc_undefined() 86 86 { 87 panic("called in cluster %x", local_cxy );87 assert( false , __FUNCTION__ , "called in cluster %x", local_cxy ); 88 88 } 89 89 … … 1036 1036 1037 1037 // call relevant kernel function 1038 if (action == DELETE_ALL_THREADS ) process_delete ( process , client_xp );1039 else if (action == BLOCK_ALL_THREADS ) process_block ( process , client_xp );1040 else if (action == UNBLOCK_ALL_THREADS ) process_unblock ( process );1038 if (action == DELETE_ALL_THREADS ) process_delete_threads ( process , client_xp ); 1039 else if (action == BLOCK_ALL_THREADS ) process_block_threads ( process , client_xp ); 1040 else if (action == UNBLOCK_ALL_THREADS ) process_unblock_threads( process ); 1041 1041 1042 1042 // decrement the responses counter in RPC descriptor, … … 2266 2266 2267 2267 // get input arguments from client RPC descriptor 2268 lid_t lid = (lid_t)hal_remote_lw ( XPTR(cxy , &desc->args[0]));2268 lid_t lid = (lid_t)hal_remote_lwd( XPTR(cxy , &desc->args[0])); 2269 2269 2270 2270 // call local kernel function … … 2321 2321 2322 2322 // get input arguments from client RPC descriptor 2323 process = (process_t *)(intptr_t)hal_remote_l pt( XPTR(cxy , &desc->args[0]));2323 process = (process_t *)(intptr_t)hal_remote_lwd( XPTR(cxy , &desc->args[0])); 2324 2324 2325 2325 // call local kernel function … … 2331 2331 } 2332 2332 2333 2333 ///////////////////////////////////////////////////////////////////////////////////////// 2334 // [29] Marshaling functions attached to RPC_VMM_DISPLAY (blocking) 2335 ///////////////////////////////////////////////////////////////////////////////////////// 2336 2337 ///////////////////////////////////////////// 2338 void rpc_vmm_display_client( cxy_t cxy, 2339 process_t * process, 2340 bool_t detailed ) 2341 { 2342 rpc_dmsg("\n[DBG] %s : enter / thread %x on core[%x,%d] / cycle %d\n", 2343 __FUNCTION__ , CURRENT_THREAD->trdid , local_cxy, 2344 CURRENT_THREAD->core->lid , hal_time_stamp() ); 2345 2346 assert( (cxy != local_cxy) , __FUNCTION__ , "target cluster is not remote\n"); 2347 2348 // initialise RPC descriptor header 2349 rpc_desc_t rpc; 2350 rpc.index = RPC_VMM_DISPLAY; 2351 rpc.response = 1; 2352 rpc.blocking = true; 2353 2354 // set input arguments in RPC descriptor 2355 rpc.args[0] = (uint64_t)(intptr_t)process; 2356 rpc.args[1] = (uint64_t)detailed; 2357 2358 // register RPC request in remote RPC fifo (blocking function) 2359 rpc_send( cxy , &rpc ); 2360 2361 rpc_dmsg("\n[DBG] %s : exit / thread %x on core[%x,%d] / cycle %d\n", 2362 __FUNCTION__ , CURRENT_THREAD->trdid , local_cxy, 2363 CURRENT_THREAD->core->lid , hal_time_stamp() ); 2364 } 2365 2366 //////////////////////////////////////// 2367 void rpc_vmm_display_server( xptr_t xp ) 2368 { 2369 rpc_dmsg("\n[DBG] %s : enter / thread %x on core[%x,%d] / cycle %d\n", 2370 __FUNCTION__ , CURRENT_THREAD->trdid , local_cxy, 2371 CURRENT_THREAD->core->lid , hal_time_stamp() ); 2372 2373 process_t * process; 2374 bool_t detailed; 2375 2376 // get client cluster identifier and pointer on RPC descriptor 2377 cxy_t cxy = (cxy_t)GET_CXY( xp ); 2378 rpc_desc_t * desc = (rpc_desc_t *)GET_PTR( xp ); 2379 2380 // get input arguments from client RPC descriptor 2381 process = (process_t *)(intptr_t)hal_remote_lwd( XPTR(cxy , &desc->args[0])); 2382 detailed = (bool_t) hal_remote_lwd( XPTR(cxy , &desc->args[1])); 2383 2384 // call local kernel function 2385 vmm_display( process , detailed ); 2386 2387 rpc_dmsg("\n[DBG] %s : exit / thread %x on core[%x,%d] / cycle %d\n", 2388 __FUNCTION__ , CURRENT_THREAD->trdid , local_cxy, 2389 CURRENT_THREAD->core->lid , hal_time_stamp() ); 2390 } 2391 2392
Note: See TracChangeset
for help on using the changeset viewer.