Ignore:
Timestamp:
Jan 4, 2018, 10:05:47 AM (4 years ago)
Author:
alain
Message:

Improve sys_exec.

File:
1 edited

Legend:

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

    r409 r416  
    109109{
    110110        rpc_index_t         index;       /*! index of requested RPC service           */
    111         volatile uint32_t   response;    /*! response valid when 0                    */
     111        volatile uint32_t   response;    /*! all responses received when 0            */
    112112    struct thread_s   * thread;      /*! local pointer on client thread           */
    113113    uint32_t            lid;         /*! index of core running the calling thread */
     114    bool_t              blocking;    /*! blocking RPC when true                   */
    114115    uint64_t            args[10];    /*! input/output arguments buffer            */
    115116}
     
    127128 * the caller. It exit with a Panic message if remote fifo is still full after
    128129 * (CONFIG_RPC_PUT_MAX_ITERATIONS) retries.
    129  * - When the <block> argument is true, this function blocks and deschedule.
     130 * - When the RPC <blocking> field is true, this function blocks and deschedule.
    130131 *   It returns only when the server acknowledges the RPC by writing in the RPC
    131132 *   "response" field, and unblocks the client.
    132  * - When the <block> argument is false, this function returns as soon as the RPC
     133 * - When the <blocking> field is false, this function returns as soon as the RPC
    133134 *   has been registered in the FIFO, and the server thread must directly signal
    134135 *   completion to the client thread.
     
    136137 * @ cxy   : server cluster identifier
    137138 * @ desc  : local pointer on RPC descriptor in client cluster
    138  * @ block : boolean true when blocking behaviour is required.
    139139 **********************************************************************************/
    140140void rpc_send( cxy_t        cxy,   
    141                rpc_desc_t * desc,
    142                bool_t       block );
     141               rpc_desc_t * desc );
    143142
    144143
     
    252251/***********************************************************************************
    253252 * [4] The RPC_PROCESS_MAKE_EXIT can be called by any thread to request the owner
    254  * cluster to execute the process_make_exit() function for a calling process.
    255  ***********************************************************************************
    256  * @ cxy      : server cluster identifier.
    257  * @ process  : local pointer on calling process in owner cluster.
     253 * cluster to execute the process_make_exit() function for the target process.
     254 ***********************************************************************************
     255 * @ cxy      : owner cluster identifier.
     256 * @ pid      : target process identifier.
    258257 * @ status   : calling process exit status.
    259258 **********************************************************************************/
    260259void rpc_process_make_exit_client( cxy_t              cxy,
    261                                    struct process_s * process,
     260                                   pid_t              pid,
    262261                                   uint32_t           status );
    263262
     
    268267 * cluster to execute the process_make_kill() function for a target process.
    269268 ***********************************************************************************
    270  * @ cxy      : server cluster identifier.
    271  * @ process  : local pointer on target process in owner cluster.
     269 * @ cxy      : owner cluster identifier.
     270 * @ pid      : target process identifier.
    272271 * @ seg_id   : signal type (only SIGKILL / SIGSTOP / SIGCONT are supported).
    273272 **********************************************************************************/
    274273void rpc_process_make_kill_client( cxy_t              cxy,
    275                                    struct process_s * process,
     274                                   pid_t              pid,
    276275                                   uint32_t           seg_id );
    277276
     
    339338 *
    340339 * WARNING : It is implemented as a NON BLOCKING multicast RPC, that can be sent
    341  * in parallel to all process copies. The various server threads must decrement the
    342  * responses counter defined by the <rsp_xp> argument, and the last server thread
    343  * must unblock the <client_xp> thread.
     340 * in parallel to all process copies. The rpc descriptor is allocated in the client
     341 * thread stack by the process_sigaction() function. The various server threads
     342 * must decrement the responses counter defined in the rsp descriptor, and the last
     343 * server thread unblock the client thread that blocked (after sending all RPC
     344 * requests) in the process_sigaction() function.
     345 * - The first RPC argument is the sigaction type (BLOCK / UNBLOCK / DELETE).
     346 * - The second RPC argument is the local pointer on target process.
    344347 ***********************************************************************************
    345348 * @ cxy       : server cluster identifier.
    346  * @ process   : [in]  local pointer on target process in server cluster.
    347  * @ sigaction : [in]  action type (BLOCK / UNBLOCK / DELETE).
    348  * @ rsp_xp    : [in]  extended pointer on response counter.
    349  * @ client_xp : [in]  extended pointer on client thread.
    350  **********************************************************************************/
    351 void rpc_process_sigaction_client( cxy_t               cxy,
    352                                    struct process_s  * process,
    353                                    uint32_t            sigaction,
    354                                    xptr_t              rsp_xp,
    355                                    xptr_t              client_xp );
     349 * @ rpc_ptr   : [in]  local pointer on rpc descriptor in client cluster.
     350 **********************************************************************************/
     351void rpc_process_sigaction_client( cxy_t        cxy,
     352                                   rpc_desc_t * rpc_ptr );
    356353                             
    357354void rpc_process_sigaction_server( xptr_t xp );
Note: See TracChangeset for help on using the changeset viewer.