Ignore:
Timestamp:
Feb 12, 2019, 1:15:47 PM (3 years ago)
Author:
alain
Message:

1) Fix a bug in KSH : after the "load" command,

the [ksh] prompt is now printed after completion
of the loaded application.

2) Fix a bug in vmm_handle_cow() : the copy-on-write

use now a hal_remote_memcpy() to replicate the page content.


File:
1 edited

Legend:

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

    r614 r619  
    6969    RPC_THREAD_KERNEL_CREATE      = 7,
    7070    RPC_UNDEFINED_8               = 8,
    71     RPC_PROCESS_SIGACTION         = 9,       // non blocking
     71    RPC_PROCESS_SIGACTION         = 9,
    7272
    7373    RPC_VFS_INODE_CREATE          = 10,
     
    8888    RPC_UNDEFINED_24              = 24,
    8989    RPC_MAPPER_HANDLE_MISS        = 25,
    90     RPC_VMM_DELETE_VSEG           = 26,      // non blocking
     90    RPC_VMM_DELETE_VSEG           = 26,
    9191    RPC_VMM_CREATE_VSEG           = 27,
    9292    RPC_VMM_SET_COW               = 28,
     
    105105
    106106/***********************************************************************************
    107  *  This structure defines the RPC descriptor
     107 *  This structure defines the RPC descriptor (100 bytes on a 32bits core)
    108108 **********************************************************************************/
    109109
    110110typedef struct rpc_desc_s
    111111{
    112         rpc_index_t         index;       /*! index of requested RPC service          */
    113         volatile uint32_t   responses;   /*! number of expected responses            */
    114     struct thread_s   * thread;      /*! local pointer on client thread          */
    115     uint32_t            lid;         /*! index of core running the calling thread */
    116     bool_t              blocking;    /*! blocking RPC when true                  */
    117     uint64_t            args[10];    /*! input/output arguments buffer           */
     112        rpc_index_t         index;       /*! index of requested RPC service      ( 4) */
     113        uint32_t          * rsp;         /*! local pointer ond responses counter ( 4) */
     114    struct thread_s   * thread;      /*! local pointer on client thread      ( 4) */
     115    uint32_t            lid;         /*! index of core running client thread ( 4) */
     116    bool_t              blocking;    /*! simple RPC mode when true           ( 4) */
     117    uint64_t            args[10];    /*! input/output arguments buffer       (80) */
    118118}
    119119rpc_desc_t;
     
    161161 * - it block on IDLE and deschedule otherwise. 
    162162 **********************************************************************************/
    163 void rpc_thread_func( void );
     163void rpc_server_func( void );
    164164
    165165/***********************************************************************************
     
    309309
    310310/***********************************************************************************
    311  * [9] The non blocking RPC_PROCESS_SIGACTION allows any client thread running in
    312  * any cluster to send parallel RPC requests to one or several servers (that can be
    313  * local or remote), to execute a given sigaction, defined by the <action_type>
    314  * argument[1], for a given process identified by the <pid> argument[0].
    315  *
    316  * WARNING : It is implemented as a NON BLOCKING RPC, that can be sent in parallel
    317  * to several servers. The RPC descriptor, containing the <action_type> and <pid>
    318  * arguments, as well as the RPC <index>, <blocked>, and <response> fields, must
    319  * be allocated and initialised by the calling function itself.
    320  * Each RPC server thread atomically decrements the <response> field in this
    321  * shared RPC descriptor. The last server thread unblock the client thread,
    322  * that blocked only after sending all parallel RPC requests to all servers.
     311 * [9] The RPC_PROCESS_SIGACTION allows any client thread to request to any cluster
     312 * execute a given sigaction, defined by the <action_type> for a given process,
     313 * identified by the <pid> argument.
    323314 ***********************************************************************************
    324315 * @ cxy     : server cluster identifier.
    325  * @ rpc     : pointer on shared RPC descriptor initialized by the client thread.
    326  **********************************************************************************/
    327 void rpc_process_sigaction_client( cxy_t               cxy,
    328                                    struct rpc_desc_s * rpc );
     316 * @ pid     : [in] target process identifier.
     317 * @ action  : [in] sigaction index.
     318 **********************************************************************************/
     319void rpc_process_sigaction_client( cxy_t     cxy,
     320                                   pid_t     pid,
     321                                   uint32_t  action );
    329322                             
    330323void rpc_process_sigaction_server( xptr_t xp );
     
    596589
    597590/***********************************************************************************
    598  * [26] The non blocking RPC_VMM_DELETE_VSEG allows any client thread running in
    599  * any cluster to send parallel RPC requests to one or several clusters (that can be
    600  * local or remote), to delete from a given VMM, identified by the <pid> argument[0]
    601  * a given vseg, identified by the <vaddr> argument[1].
    602  *
    603  * WARNING : It is implemented as a NON BLOCKING RPC, that can be sent in parallel
    604  * to several servers. The RPC descriptor, containing the <pid> and <vaddr>
    605  * arguments, as well as the RPC <index>, <blocked>, and <response> fields, must
    606  * be allocated and initialised by the calling function itself.
    607  * Each RPC server thread atomically decrements the the <response> field in this
    608  * shared RPC descriptor. The last server thread unblock the client thread,
    609  * that blocked only after sending all paralle RPC requests to all servers.
     591 * [26] The RPC_VMM_DELETE_VSEG allows any client thread  to request a remote
     592 * cluster to delete from a given VMM, identified by the <pid> argument
     593 * a given vseg, identified by the <vaddr> argument.
    610594 ***********************************************************************************
    611595 * @ cxy         : server cluster identifier.
    612  * @ rpc     : pointer on shared RPC descriptor initialized by the client thread.
    613  **********************************************************************************/
    614 void rpc_vmm_delete_vseg_client( cxy_t               cxy,
    615                                  struct rpc_desc_s * rpc );
     596 * @ pid         : [in] target process identifier.
     597 * @ vaddr       : [in] vseg base address.
     598 **********************************************************************************/
     599void rpc_vmm_delete_vseg_client( cxy_t       cxy,
     600                                 pid_t       pid,
     601                                 intptr_t    vaddr );
    616602 
    617603void rpc_vmm_delete_vseg_server( xptr_t xp );
Note: See TracChangeset for help on using the changeset viewer.