Ignore:
Timestamp:
Mar 7, 2018, 9:02:03 AM (6 years ago)
Author:
alain
Message:

1) improve the threads and process destruction mechanism.
2) introduce FIFOs in the soclib_tty driver.

File:
1 edited

Legend:

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

    r435 r436  
    4848struct mapper_s;
    4949
     50
    5051/**********************************************************************************/
    5152/**************  structures for Remote Procedure Calls ****************************/
     
    6768    RPC_THREAD_USER_CREATE     = 6,
    6869    RPC_THREAD_KERNEL_CREATE   = 7,
    69     RPC_THREAD_KILL            = 8,
     70    RPC_UNDEFINED_8            = 8,
    7071    RPC_PROCESS_SIGACTION      = 9,
    7172
     
    288289
    289290/***********************************************************************************
    290  * [8] The RPC_THREAD_KILL ask a target cluster to kill a given thread descriptor.
    291  * It is called by the sys_thread_cancel() function for a remote thread.
    292  ***********************************************************************************
    293  * @ cxy       : server cluster identifier.
    294  * @ thread   : [in]  local pointer on target process descriptor in server.
    295  **********************************************************************************/
    296 void rpc_thread_kill_client( cxy_t              cxy,
    297                              struct thread_s  * thread );
    298                              
    299 void rpc_thread_kill_server( xptr_t xp );
    300 
    301 /***********************************************************************************
    302  * [9] The RPC_PROCESS_SIGACTION allows the owner cluster to request any other
    303  * cluster to execute a given sigaction (BLOCK / UNBLOCK / DELETE) for all
    304  * threads of a given process.
     291 * [8] undefined slot
     292 **********************************************************************************/
     293
     294/***********************************************************************************
     295 * [9] The RPC_PROCESS_SIGACTION allows a thread running in any cluster
     296 * to request a cluster identified by the <cxy> argument (local or remote)
     297 * to execute a given sigaction for a given cluster. The <action_type> and
     298 * the <pid> arguments are defined in the shared RPC descriptor, that must be
     299 * initialised by the client thread.
    305300 *
    306301 * WARNING : It is implemented as a NON BLOCKING multicast RPC, that can be sent
    307  * in parallel to all process copies. The rpc descriptor is allocated in the client
    308  * thread stack by the process_sigaction() function. The various server threads
    309  * must decrement the responses counter defined in the rsp descriptor, and the last
    310  * server thread unblock the client thread that blocked (after sending all RPC
    311  * requests) in the process_sigaction() function.
    312  * - The first RPC argument is the sigaction type (BLOCK / UNBLOCK / DELETE).
    313  * - The second RPC argument is the local pointer on target process.
    314  ***********************************************************************************
    315  * @ cxy       : server cluster identifier.
    316  * @ rpc_ptr   : [in]  local pointer on rpc descriptor in client cluster.
    317  **********************************************************************************/
    318 void rpc_process_sigaction_client( cxy_t        cxy,
    319                                    rpc_desc_t * rpc_ptr );
     302 * in parallel to all process copies. The various RPC server threads atomically
     303 * decrement the <response> field in the shared RPC descriptor.
     304 * The last server thread unblock the client thread that blocked (after sending
     305 * all RPC requests) in the process_sigaction() function.
     306 ***********************************************************************************
     307 * @ cxy     : server cluster identifier.
     308 * @ rpc     : pointer on ishared RPC descriptor initialized by the client thread.
     309 **********************************************************************************/
     310void rpc_process_sigaction_client( cxy_t               cxy,
     311                                   struct rpc_desc_s * rpc );
    320312                             
    321313void rpc_process_sigaction_server( xptr_t xp );
Note: See TracChangeset for help on using the changeset viewer.