Ignore:
Timestamp:
Jan 29, 2018, 6:08:07 PM (4 years ago)
Author:
alain
Message:

blip

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/kernel/kern/rpc.c

    r416 r428  
    7979    &rpc_sched_display_server,          // 27
    8080    &rpc_vmm_set_cow_server,            // 28
    81     &rpc_undefined,                     // 29
     81    &rpc_vmm_display_server,            // 29
    8282};
    8383
     
    8585void __attribute__((noinline)) rpc_undefined()
    8686{
    87         panic("called in cluster %x", local_cxy );
     87        assert( false , __FUNCTION__ , "called in cluster %x", local_cxy );
    8888}
    8989
     
    10361036
    10371037    // 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             );
    10411041
    10421042    // decrement the responses counter in RPC descriptor,
     
    22662266
    22672267    // 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]));
    22692269   
    22702270    // call local kernel function
     
    23212321
    23222322    // get input arguments from client RPC descriptor
    2323     process = (process_t *)(intptr_t)hal_remote_lpt( XPTR(cxy , &desc->args[0]));
     2323    process = (process_t *)(intptr_t)hal_remote_lwd( XPTR(cxy , &desc->args[0]));
    23242324   
    23252325    // call local kernel function
     
    23312331}
    23322332
    2333 
     2333/////////////////////////////////////////////////////////////////////////////////////////
     2334// [29]          Marshaling functions attached to RPC_VMM_DISPLAY (blocking)
     2335/////////////////////////////////////////////////////////////////////////////////////////
     2336
     2337/////////////////////////////////////////////
     2338void 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////////////////////////////////////////
     2367void 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.