Index: trunk/kernel/kern/rpc.c
===================================================================
--- trunk/kernel/kern/rpc.c	(revision 641)
+++ trunk/kernel/kern/rpc.c	(revision 657)
@@ -2,5 +2,5 @@
  * rpc.c - RPC operations implementation.
  * 
- * Author    Alain Greiner (2016,2017,2018,2019)
+ * Author    Alain Greiner (2016,2017,2018,2019,2020)
  *
  * Copyright (c)  UPMC Sorbonne Universites
@@ -59,28 +59,17 @@
     &rpc_thread_user_create_server,        // 6
     &rpc_thread_kernel_create_server,      // 7
-    &rpc_vfs_fs_update_dentry_server,      // 8
+    &rpc_undefined,                        // 8
     &rpc_process_sigaction_server,         // 9
 
-    &rpc_vfs_inode_create_server,          // 10  
-    &rpc_vfs_inode_destroy_server,         // 11  
-    &rpc_vfs_dentry_create_server,         // 12  
-    &rpc_vfs_dentry_destroy_server,        // 13  
-    &rpc_vfs_file_create_server,           // 14
-    &rpc_vfs_file_destroy_server,          // 15
-    &rpc_vfs_fs_new_dentry_server,         // 16
-    &rpc_vfs_fs_add_dentry_server,         // 17
-    &rpc_vfs_fs_remove_dentry_server,      // 18
-    &rpc_vfs_inode_load_all_pages_server,  // 19 
-
-    &rpc_undefined,                        // 20
-    &rpc_undefined,                        // 21
-    &rpc_undefined,                        // 22
-    &rpc_undefined,                        // 23
-    &rpc_mapper_sync_server,               // 24
-    &rpc_vmm_resize_vseg_server,           // 25
-    &rpc_vmm_remove_vseg_server,           // 26 
-    &rpc_vmm_create_vseg_server,           // 27
-    &rpc_vmm_set_cow_server,               // 28
-    &rpc_undefined,                        // 29
+    &rpc_undefined,                        // 10
+    &rpc_undefined,                        // 11
+    &rpc_undefined,                        // 12
+    &rpc_undefined,                        // 13
+    &rpc_undefined,                        // 14
+    &rpc_vmm_resize_vseg_server,           // 15
+    &rpc_vmm_remove_vseg_server,           // 16 
+    &rpc_vmm_create_vseg_server,           // 17
+    &rpc_vmm_set_cow_server,               // 18
+    &rpc_undefined,                        // 19
 };
 
@@ -95,28 +84,17 @@
     "THREAD_USER_CREATE",        // 6
     "THREAD_KERNEL_CREATE",      // 7
-    "VFS_FS_UPDATE_DENTRY",      // 8
+    "FBF_DISPLAY",               // 8
     "PROCESS_SIGACTION",         // 9
 
-    "VFS_INODE_CREATE",          // 10
-    "VFS_INODE_DESTROY",         // 11
-    "VFS_DENTRY_CREATE",         // 12
-    "VFS_DENTRY_DESTROY",        // 13
-    "VFS_FILE_CREATE",           // 14
-    "VFS_FILE_DESTROY",          // 15
-    "VFS_FS_NEW_DENTRY",         // 16
-    "VFS_FS_ADD_DENTRY",         // 17
-    "VFS_FS_REMOVE_DENTRY",      // 18
-    "VFS_INODE_LOAD_ALL_PAGES",  // 19
-
-    "VMM_GLOBAL_RESIZE_VSEG",    // 20
-    "VMM_GLOBAL_UPDATE_PTE",     // 21
-    "undefined_22",              // 22
-    "undefined_23",              // 23
-    "MAPPER_SYNC",               // 24
-    "undefined_25",              // 25
-    "VMM_REMOVE_VSEG",           // 26
-    "VMM_CREATE_VSEG",           // 27
-    "VMM_SET_COW",               // 28
-    "undefined_29",              // 29
+    "undefined_10",              // 10
+    "undefined_11",              // 11
+    "undefined_12",              // 12
+    "undefined_13",              // 13
+    "undefined_14",              // 14
+    "VMM_RESIZE_VSEG",           // 15
+    "VMM_REMOVE_VSEG",           // 16
+    "VMM_CREATE_VSEG",           // 17
+    "VMM_SET_COW",               // 18
+    "undefined_19",              // 19
 };
 
@@ -423,212 +401,24 @@
 
 
-/////////////////////////////////////////////////////////////////////////////////////////
-// [0]       RPC_PMEM_GET_PAGES deprecated [AG] May 2019
-/////////////////////////////////////////////////////////////////////////////////////////
-
-/*
-///////////////////////////////////////////////
-void rpc_pmem_get_pages_client( cxy_t      cxy,
-                                uint32_t   order,      // in 
-                                page_t  ** page )      // out 
-{
-#if DEBUG_RPC_PMEM_GET_PAGES
-thread_t * this = CURRENT_THREAD;
-uint32_t cycle = (uint32_t)hal_get_cycles();
-if( cycle > DEBUG_RPC_PMEM_GET_PAGES )
-printk("\n[%s] thread[%x,%x] on core %d enter / cycle %d\n",
-__FUNCTION__, this->process->pid, this->trdid, this->core->lid, cycle );
-#endif
-
-    uint32_t responses = 1;
-
-    // initialise RPC descriptor header 
-    rpc_desc_t  rpc;
-    rpc.index     = RPC_PMEM_GET_PAGES;
-    rpc.blocking  = true;
-    rpc.rsp       = &responses;
-
-    // set input arguments in RPC descriptor 
-    rpc.args[0] = (uint64_t)order;
-
-    // register RPC request in remote RPC fifo
-    rpc_send( cxy , &rpc );
-
-    // get output arguments from RPC descriptor
-    *page = (page_t *)(intptr_t)rpc.args[1];
-
-#if DEBUG_RPC_PMEM_GET_PAGES
-cycle = (uint32_t)hal_get_cycles();
-if( cycle > DEBUG_RPC_PMEM_GET_PAGES )
-printk("\n[%s] thread[%x,%x] on core %d exit / cycle %d\n",
-__FUNCTION__, this->process->pid, this->trdid, this->core->lid, cycle );
-#endif
-}
-
-///////////////////////////////////////////
-void rpc_pmem_get_pages_server( xptr_t xp )
-{
-#if DEBUG_RPC_PMEM_GET_PAGES
-thread_t * this = CURRENT_THREAD;
-uint32_t cycle = (uint32_t)hal_get_cycles();
-if( cycle > DEBUG_RPC_PMEM_GET_PAGES )
-printk("\n[%s] thread[%x,%x] on core %d enter / cycle %d\n",
-__FUNCTION__, this->process->pid, this->trdid, this->core->lid, cycle );
-#endif
-
-    // get client cluster identifier and pointer on RPC descriptor
-    cxy_t        cxy  = GET_CXY( xp );
-    rpc_desc_t * desc = GET_PTR( xp );
-
-    // get input arguments from client RPC descriptor
-    uint32_t order = (uint32_t)hal_remote_l64( XPTR( cxy , &desc->args[0] ) );
-    
-    // call local pmem allocator
-    page_t * page = ppm_alloc_pages( order ); 
-
-    // set output arguments into client RPC descriptor
-    hal_remote_s64( XPTR( cxy , &desc->args[1] ) , (uint64_t)(intptr_t)page );
-
-#if DEBUG_RPC_PMEM_GET_PAGES
-cycle = (uint32_t)hal_get_cycles();
-if( cycle > DEBUG_RPC_PMEM_GET_PAGES )
-printk("\n[%s] thread[%x,%x] on core %d exit / cycle %d\n",
-__FUNCTION__, this->process->pid, this->trdid, this->core->lid, cycle );
-#endif
-}
-*/
-
-/////////////////////////////////////////////////////////////////////////////////////////
-// [1]       RPC_PMEM_RELEASE_PAGES deprecated [AG] may 2019
-/////////////////////////////////////////////////////////////////////////////////////////
-
-/*
-//////////////////////////////////////////////////
-void rpc_pmem_release_pages_client( cxy_t     cxy,
-                                    page_t  * page )      // out 
-{
-#if DEBUG_RPC_PMEM_RELEASE_PAGES
-thread_t * this = CURRENT_THREAD;
-uint32_t cycle = (uint32_t)hal_get_cycles();
-if( cycle > DEBUG_RPC_PMEM_RELEASE_PAGES )
-printk("\n[%s] thread[%x,%x] on core %d enter / cycle %d\n",
-__FUNCTION__, this->process->pid, this->trdid, this->core->lid , cycle );
-#endif
-
-    uint32_t responses = 1;
-
-    // initialise RPC descriptor header 
-    rpc_desc_t  rpc;
-    rpc.index    = RPC_PMEM_RELEASE_PAGES;
-    rpc.blocking = true;
-    rpc.rsp      = &responses;
-
-    // set input arguments in RPC descriptor 
-    rpc.args[0] = (uint64_t)(intptr_t)page;
-
-    // register RPC request in remote RPC fifo
-    rpc_send( cxy , &rpc );
-
-#if DEBUG_RPC_PMEM_RELEASE_PAGES
-cycle = (uint32_t)hal_get_cycles();
-if( cycle > DEBUG_RPC_PMEM_RELEASE_PAGES )
-printk("\n[%s] thread[%x,%x] on core %d exit / cycle %d\n",
-__FUNCTION__, this->process->pid, this->trdid, this->core->lid, cycle );
-#endif
-}
-
-///////////////////////////////////////////////
-void rpc_pmem_release_pages_server( xptr_t xp )
-{
-#if DEBUG_RPC_PMEM_RELEASE_PAGES
-thread_t * this = CURRENT_THREAD;
-uint32_t cycle = (uint32_t)hal_get_cycles();
-if( cycle > DEBUG_RPC_PMEM_RELEASE_PAGES )
-printk("\n[%s] thread[%x,%x] on core %d enter / cycle %d\n",
-__FUNCTION__, this->process->pid, this->trdid, this->core->lid , cycle );
-#endif
-
-    // get client cluster identifier and pointer on RPC descriptor
-    cxy_t        cxy  = GET_CXY( xp );
-    rpc_desc_t * desc = GET_PTR( xp );
-
-    // get input arguments from client RPC descriptor
-    page_t * page = (page_t *)(intptr_t)hal_remote_l64( XPTR( cxy , &desc->args[0] ) );
-    
-    // release memory to local pmem 
-    kmem_req_t req;
-    req.type = KMEM_PPM;
-    req.ptr  = page;
-    kmem_free( &req );
-
-#if DEBUG_RPC_PMEM_RELEASE_PAGES
-cycle = (uint32_t)hal_get_cycles();
-if( cycle > DEBUG_RPC_PMEM_RELEASE_PAGES )
-printk("\n[%s] thread[%x,%x] on core %d exit / cycle %d\n",
-__FUNCTION__, this->process->pid, this->trdid, this->core->lid, cycle );
-#endif
-}
-*/
-
-/////////////////////////////////////////////////////////////////////////////////////////
-// [2]          RPC_PPM_DISPLAY deprecated [AG] May 2019    
-/////////////////////////////////////////////////////////////////////////////////////////
-
-/*
-/////////////////////////////////////////
-void rpc_ppm_display_client( cxy_t  cxy )
-{
-#if DEBUG_RPC_PPM_DISPLAY
-thread_t * this = CURRENT_THREAD;
-uint32_t cycle = (uint32_t)hal_get_cycles();
-if( cycle > DEBUG_RPC_PPM_DISPLAY )
-printk("\n[%s] thread[%x,%x] on core %d enter / cycle %d\n",
-__FUNCTION__, this->process->pid, this->trdid, this->core->lid , cycle );
-#endif
-
-    uint32_t responses = 1;
-
-    // initialise RPC descriptor header 
-    rpc_desc_t  rpc;
-    rpc.index    = RPC_PPM_DISPLAY;
-    rpc.blocking = true;
-    rpc.rsp      = &responses;
-
-    // register RPC request in remote RPC fifo
-    rpc_send( cxy , &rpc );
-
-#if DEBUG_RPC_PPM_DISPLAY
-cycle = (uint32_t)hal_get_cycles();
-if( cycle > DEBUG_RPC_PPM_DISPLAY )
-printk("\n[%s] thread[%x,%x] on core %d exit / cycle %d\n",
-__FUNCTION__, this->process->pid, this->trdid, this->core->lid, cycle );
-#endif
-}
-
-////////////////////////////////////////////////////////////////////
-void rpc_ppm_display_server( xptr_t __attribute__((__unused__)) xp )
-{
-#if DEBUG_RPC_PPM_DISPLAY
-thread_t * this = CURRENT_THREAD;
-uint32_t cycle = (uint32_t)hal_get_cycles();
-if( cycle > DEBUG_RPC_PPM_DISPLAY )
-printk("\n[%s] thread[%x,%x] on core %d enter / cycle %d\n",
-__FUNCTION__, this->process->pid, this->trdid, this->core->lid , cycle );
-#endif
-
-    // call local kernel function
-    ppm_display();
-
-#if DEBUG_RPC_PPM_DISPLAY
-cycle = (uint32_t)hal_get_cycles();
-if( cycle > DEBUG_RPC_PPM_DISPLAY )
-printk("\n[%s] thread[%x,%x] on core %d exit / cycle %d\n",
-__FUNCTION__, this->process->pid, this->trdid, this->core->lid, cycle );
-#endif
-}
-*/
-
-/////////////////////////////////////////////////////////////////////////////////////////
-// [3]           Marshaling functions attached to RPC_PROCESS_MAKE_FORK 
+/***************************************************************************************/
+/************ Marshaling functions ordered by increasing index *************************/
+/***************************************************************************************/
+
+
+/////////////////////////////////////////////////////////////////////////////////////////
+// [0]           undefined                                               
+/////////////////////////////////////////////////////////////////////////////////////////
+
+/////////////////////////////////////////////////////////////////////////////////////////
+// [1]           undefined                                               
+/////////////////////////////////////////////////////////////////////////////////////////
+
+/////////////////////////////////////////////////////////////////////////////////////////
+// [2]           undefined                                               
+/////////////////////////////////////////////////////////////////////////////////////////
+
+
+/////////////////////////////////////////////////////////////////////////////////////////
+// [3]           Marshaling function attached to RPC_MAKE_FORK           
 /////////////////////////////////////////////////////////////////////////////////////////
 
@@ -1073,87 +863,6 @@
 
 /////////////////////////////////////////////////////////////////////////////////////////
-// [8]   Marshaling functions attached to RPC_VFS_FS_UPDATE_DENTRY
-/////////////////////////////////////////////////////////////////////////////////////////
-
-/////////////////////////////////////////////////////////
-void rpc_vfs_fs_update_dentry_client( cxy_t          cxy,
-                                      vfs_inode_t  * inode,
-                                      vfs_dentry_t * dentry,
-                                      uint32_t       size,
-                                      error_t      * error )
-{
-#if DEBUG_RPC_VFS_FS_UPDATE_DENTRY
-thread_t * this = CURRENT_THREAD;
-uint32_t cycle = (uint32_t)hal_get_cycles();
-if( cycle > DEBUG_RPC_VFS_FS_UPDATE_DENTRY )
-printk("\n[%s] thread[%x,%x] on core %d enter / cycle %d\n",
-__FUNCTION__, this->process->pid, this->trdid, this->core->lid , cycle );
-#endif
-
-    uint32_t responses = 1;
-
-    // initialise RPC descriptor header 
-    rpc_desc_t  rpc;
-    rpc.index    = RPC_VFS_FS_UPDATE_DENTRY;
-    rpc.blocking = true;
-    rpc.rsp      = &responses;
-
-    // set input arguments in RPC descriptor 
-    rpc.args[0] = (uint64_t)(intptr_t)inode;
-    rpc.args[1] = (uint64_t)(intptr_t)dentry;
-    rpc.args[2] = (uint64_t)size;
-
-    // register RPC request in remote RPC fifo
-    rpc_send( cxy , &rpc );
-
-    // get output values from RPC descriptor
-    *error   = (error_t)rpc.args[3];
-
-#if DEBUG_RPC_VFS_FS_UPDATE_DENTRY
-cycle = (uint32_t)hal_get_cycles();
-if( cycle > DEBUG_RPC_VFS_FS_UPDATE_DENTRY )
-printk("\n[%s] thread[%x,%x] on core %d exit / cycle %d\n",
-__FUNCTION__, this->process->pid, this->trdid, this->core->lid , cycle );
-#endif
-}
-
-/////////////////////////////////////////////////
-void rpc_vfs_fs_update_dentry_server( xptr_t xp )
-{
-#if DEBUG_RPC_VFS_FS_UPDATE_DENTRY
-thread_t * this = CURRENT_THREAD;
-uint32_t cycle = (uint32_t)hal_get_cycles();
-if( cycle > DEBUG_RPC_VFS_FS_UPDATE_DENTRY )
-printk("\n[%s] thread[%x,%x] on core %d enter / cycle %d\n",
-__FUNCTION__, this->process->pid, this->trdid, this->core->lid , cycle );
-#endif
-
-    error_t        error;
-    vfs_inode_t  * inode;
-    vfs_dentry_t * dentry;
-    uint32_t       size;
-
-    // get client cluster identifier and pointer on RPC descriptor
-    cxy_t        client_cxy  = GET_CXY( xp );
-    rpc_desc_t * desc        = GET_PTR( xp );
-
-    // get input arguments
-    inode  = (vfs_inode_t*)(intptr_t) hal_remote_l64(XPTR(client_cxy , &desc->args[0]));
-    dentry = (vfs_dentry_t*)(intptr_t)hal_remote_l64(XPTR(client_cxy , &desc->args[1]));
-    size   = (uint32_t)               hal_remote_l64(XPTR(client_cxy , &desc->args[2]));
-
-    // call the kernel function
-    error = vfs_fs_update_dentry( inode , dentry , size );
-
-    // set output argument
-    hal_remote_s64( XPTR( client_cxy , &desc->args[3] ) , (uint64_t)error );
-
-#if DEBUG_RPC_VFS_FS_UPDATE_DENTRY
-cycle = (uint32_t)hal_get_cycles();
-if( cycle > DEBUG_RPC_VFS_FS_UPDATE_DENTRY )
-printk("\n[%s] thread[%x,%x] on core %d exit / cycle %d\n",
-__FUNCTION__, this->process->pid, this->trdid, this->core->lid , cycle );
-#endif
-}
+// [8]      undefined
+/////////////////////////////////////////////////////////////////////////////////////////
 
 /////////////////////////////////////////////////////////////////////////////////////////
@@ -1197,5 +906,5 @@
 process_action_str( action ), pid, cycle );
 #endif
-}  // end rpc_process_sigaction_client() 
+}
 
 //////////////////////////////////////////////
@@ -1241,1149 +950,28 @@
 process_action_str( action ), pid, cycle );
 #endif
-} // end rpc_process_sigaction_server() 
-
-/////////////////////////////////////////////////////////////////////////////////////////
-// [10]     Marshaling functions attached to RPC_VFS_INODE_CREATE 
-/////////////////////////////////////////////////////////////////////////////////////////
-
-/////////////////////////////////////////////////////
-void rpc_vfs_inode_create_client( cxy_t          cxy,     
-                                  uint32_t       fs_type,    // in
-                                  uint32_t       attr,       // in
-                                  uint32_t       rights,     // in
-                                  uint32_t       uid,        // in
-                                  uint32_t       gid,        // in
-                                  xptr_t       * inode_xp,   // out
-                                  error_t      * error )     // out
-{
-#if DEBUG_RPC_VFS_INODE_CREATE
-thread_t * this = CURRENT_THREAD;
-uint32_t cycle = (uint32_t)hal_get_cycles();
-if( cycle > DEBUG_RPC_VFS_INODE_CREATE )
-printk("\n[%s] thread[%x,%x] on core %d enter / cycle %d\n",
-__FUNCTION__, this->process->pid, this->trdid, this->core->lid , cycle );
-#endif
-
-    uint32_t responses = 1;
-
-    // initialise RPC descriptor header 
-    rpc_desc_t  rpc;
-    rpc.index    = RPC_VFS_INODE_CREATE;
-    rpc.blocking = true;
-    rpc.rsp      = &responses;
-
-    // set input arguments in RPC descriptor 
-    rpc.args[0] = (uint64_t)fs_type;
-    rpc.args[1] = (uint64_t)attr;
-    rpc.args[2] = (uint64_t)rights;
-    rpc.args[3] = (uint64_t)uid;
-    rpc.args[4] = (uint64_t)gid;
-
-    // register RPC request in remote RPC fifo
-    rpc_send( cxy , &rpc );
-
-    // get output values from RPC descriptor
-    *inode_xp = (xptr_t)rpc.args[5];
-    *error    = (error_t)rpc.args[6];
-
-#if DEBUG_RPC_VFS_INODE_CREATE
-cycle = (uint32_t)hal_get_cycles();
-if( cycle > DEBUG_RPC_VFS_INODE_CREATE )
-printk("\n[%s] thread[%x,%x] on core %d exit / cycle %d\n",
-__FUNCTION__, this->process->pid, this->trdid, this->core->lid, cycle );
-#endif
-}
-
-/////////////////////////////////////////////
-void rpc_vfs_inode_create_server( xptr_t xp )
-{
-#if DEBUG_RPC_VFS_INODE_CREATE
-thread_t * this = CURRENT_THREAD;
-uint32_t cycle = (uint32_t)hal_get_cycles();
-if( cycle > DEBUG_RPC_VFS_INODE_CREATE )
-printk("\n[%s] thread[%x,%x] on core %d enter / cycle %d\n",
-__FUNCTION__, this->process->pid, this->trdid, this->core->lid, cycle );
-#endif
-
-    uint32_t         fs_type;
-    uint32_t         attr;
-    uint32_t         rights;
-    uint32_t         uid;
-    uint32_t         gid;
-    xptr_t           inode_xp;
-    error_t          error;
-
-    // get client cluster identifier and pointer on RPC descriptor
-    cxy_t        client_cxy  = GET_CXY( xp );
-    rpc_desc_t * desc        = GET_PTR( xp );
-
-    // get input arguments from client rpc descriptor
-    fs_type    = (uint32_t)  hal_remote_l64( XPTR( client_cxy , &desc->args[0] ) );
-    attr       = (uint32_t)  hal_remote_l64( XPTR( client_cxy , &desc->args[1] ) );
-    rights     = (uint32_t)  hal_remote_l64( XPTR( client_cxy , &desc->args[2] ) );
-    uid        = (uid_t)     hal_remote_l64( XPTR( client_cxy , &desc->args[3] ) );
-    gid        = (gid_t)     hal_remote_l64( XPTR( client_cxy , &desc->args[4] ) );
-
-    // call local kernel function
-    error = vfs_inode_create( fs_type,
-                              attr,
-                              rights,
-                              uid,
-                              gid,
-                              &inode_xp );
-
-    // set output arguments
-    hal_remote_s64( XPTR( client_cxy , &desc->args[5] ) , (uint64_t)inode_xp );
-    hal_remote_s64( XPTR( client_cxy , &desc->args[6] ) , (uint64_t)error );
-
-#if DEBUG_RPC_VFS_INODE_CREATE
-cycle = (uint32_t)hal_get_cycles();
-if( cycle > DEBUG_RPC_VFS_INODE_CREATE )
-printk("\n[%s] thread[%x,%x] on core %d exit / cycle %d\n",
-__FUNCTION__, this->process->pid, this->trdid, this->core->lid, cycle );
-#endif
-}
-
-/////////////////////////////////////////////////////////////////////////////////////////
-// [11]          Marshaling functions attached to RPC_VFS_INODE_DESTROY 
-/////////////////////////////////////////////////////////////////////////////////////////
-
-/////////////////////////////////////////////////////////////
-void rpc_vfs_inode_destroy_client( cxy_t                cxy,
-                                   struct vfs_inode_s * inode )
-{
-#if DEBUG_RPC_VFS_INODE_DESTROY
-thread_t * this = CURRENT_THREAD;
-uint32_t cycle = (uint32_t)hal_get_cycles();
-if( cycle > DEBUG_RPC_VFS_INODE_DESTROY )
-printk("\n[%s] thread[%x,%x] on core %d enter / cycle %d\n",
-__FUNCTION__, this->process->pid, this->trdid, this->core->lid, cycle );
-#endif
-
-    uint32_t responses = 1;
-
-    // initialise RPC descriptor header 
-    rpc_desc_t  rpc;
-    rpc.index    = RPC_VFS_INODE_DESTROY;
-    rpc.blocking = true;
-    rpc.rsp      = &responses;
-
-    // set input arguments in RPC descriptor 
-    rpc.args[0] = (uint64_t)(intptr_t)inode;
-    
-    // register RPC request in remote RPC fifo
-    rpc_send( cxy , &rpc );
-
-#if DEBUG_RPC_VFS_INODE_DESTROY
-cycle = (uint32_t)hal_get_cycles();
-if( cycle > DEBUG_RPC_VFS_INODE_DESTROY )
-printk("\n[%s] thread[%x,%x] on core %d exit / cycle %d\n",
-__FUNCTION__, this->process->pid, this->trdid, this->core->lid, cycle );
-#endif
-}
-
-//////////////////////////////////////////////
-void rpc_vfs_inode_destroy_server( xptr_t xp )
-{
-#if DEBUG_RPC_VFS_INODE_DESTROY
-thread_t * this = CURRENT_THREAD;
-uint32_t cycle = (uint32_t)hal_get_cycles();
-if( cycle > DEBUG_RPC_VFS_INODE_DESTROY )
-printk("\n[%s] thread[%x,%x] on core %d enter / cycle %d\n",
-__FUNCTION__, this->process->pid, this->trdid, this->core->lid, cycle );
-#endif
-
-    vfs_inode_t * inode;
-
-    // get client cluster identifier and pointer on RPC descriptor
-    cxy_t        client_cxy  = GET_CXY( xp );
-    rpc_desc_t * desc        = GET_PTR( xp );
-
-    // get argument "inode" from client RPC descriptor
-    inode = (vfs_inode_t *)(intptr_t)hal_remote_l64( XPTR( client_cxy , &desc->args[0] ) );
-                       
-    // call local kernel function
-    vfs_inode_destroy( inode );
-
-#if DEBUG_RPC_VFS_INODE_DESTROY
-cycle = (uint32_t)hal_get_cycles();
-if( cycle > DEBUG_RPC_VFS_INODE_DESTROY )
-printk("\n[%s] thread[%x,%x] on core %d exit / cycle %d\n",
-__FUNCTION__, this->process->pid, this->trdid, this->core->lid, cycle );
-#endif
-}
-
-/////////////////////////////////////////////////////////////////////////////////////////
-// [12]          Marshaling functions attached to RPC_VFS_DENTRY_CREATE 
-/////////////////////////////////////////////////////////////////////////////////////////
-
-//////////////////////////////////////////////////////////////
-void rpc_vfs_dentry_create_client( cxy_t                  cxy,
-                                   uint32_t               type,         // in
-                                   char                 * name,         // in
-                                   xptr_t               * dentry_xp,    // out
-                                   error_t              * error )       // out
-{
-#if DEBUG_RPC_VFS_DENTRY_CREATE
-thread_t * this = CURRENT_THREAD;
-uint32_t cycle = (uint32_t)hal_get_cycles();
-if( cycle > DEBUG_RPC_VFS_DENTRY_CREATE )
-printk("\n[%s] thread[%x,%x] on core %d enter / cycle %d\n",
-__FUNCTION__, this->process->pid, this->trdid, this->core->lid, cycle );
-#endif
-
-    uint32_t responses = 1;
-
-    // initialise RPC descriptor header 
-    rpc_desc_t  rpc;
-    rpc.index    = RPC_VFS_DENTRY_CREATE;
-    rpc.blocking = true;
-    rpc.rsp      = &responses;
-
-    // set input arguments in RPC descriptor 
-    rpc.args[0] = (uint64_t)type;
-    rpc.args[1] = (uint64_t)(intptr_t)name;
-
-    // register RPC request in remote RPC fifo
-    rpc_send( cxy , &rpc );
-
-    // get output values from RPC descriptor
-    *dentry_xp = (xptr_t)rpc.args[2];
-    *error     = (error_t)rpc.args[3];
-
-#if DEBUG_RPC_VFS_DENTRY_CREATE
-cycle = (uint32_t)hal_get_cycles();
-if( cycle > DEBUG_RPC_VFS_DENTRY_CREATE )
-printk("\n[%s] thread[%x,%x] on core %d exit / cycle %d\n",
-__FUNCTION__, this->process->pid, this->trdid, this->core->lid, cycle );
-#endif
-}
-
-//////////////////////////////////////////////
-void rpc_vfs_dentry_create_server( xptr_t xp )
-{
-#if DEBUG_RPC_VFS_DENTRY_CREATE
-thread_t * this = CURRENT_THREAD;
-uint32_t cycle = (uint32_t)hal_get_cycles();
-if( cycle > DEBUG_RPC_VFS_DENTRY_CREATE )
-printk("\n[%s] thread[%x,%x] on core %d enter / cycle %d\n",
-__FUNCTION__, this->process->pid, this->trdid, this->core->lid , cycle );
-#endif
-
-    uint32_t      type;
-    char        * name;
-    xptr_t        dentry_xp;
-    error_t       error;
-    char          name_copy[CONFIG_VFS_MAX_NAME_LENGTH];
-
-    // get client cluster identifier and pointer on RPC descriptor
-    cxy_t        client_cxy  = GET_CXY( xp );
-    rpc_desc_t * desc        = GET_PTR( xp );
-
-    // get arguments "name", "type", and "parent" from client RPC descriptor
-    type   = (uint32_t)         hal_remote_l64( XPTR( client_cxy , &desc->args[0] ) );
-    name   = (char *)(intptr_t) hal_remote_l64( XPTR( client_cxy , &desc->args[1] ) );
-
-    // makes a local copy of  name
-    hal_remote_strcpy( XPTR( local_cxy , name_copy ),
-                       XPTR( client_cxy , name ) );
-
-    // call local kernel function
-    error = vfs_dentry_create( type,
-                               name_copy,
-                               &dentry_xp );
-    // set output arguments
-    hal_remote_s64( XPTR( client_cxy , &desc->args[2] ) , (uint64_t)dentry_xp );
-    hal_remote_s64( XPTR( client_cxy , &desc->args[3] ) , (uint64_t)error );
-
-#if DEBUG_RPC_VFS_DENTRY_CREATE
-cycle = (uint32_t)hal_get_cycles();
-if( cycle > DEBUG_RPC_VFS_DENTRY_CREATE )
-printk("\n[%s] thread[%x,%x] on core %d exit / cycle %d\n",
-__FUNCTION__, this->process->pid, this->trdid, this->core->lid, cycle );
-#endif
-}
-
-/////////////////////////////////////////////////////////////////////////////////////////
-// [13]          Marshaling functions attached to RPC_VFS_DENTRY_DESTROY 
-/////////////////////////////////////////////////////////////////////////////////////////
-
-///////////////////////////////////////////////////////
-void rpc_vfs_dentry_destroy_client( cxy_t          cxy,
-                                    vfs_dentry_t * dentry )
-{
-#if DEBUG_RPC_VFS_DENTRY_DESTROY
-thread_t * this = CURRENT_THREAD;
-uint32_t cycle = (uint32_t)hal_get_cycles();
-if( cycle > DEBUG_RPC_VFS_DENTRY_DESTROY )
-printk("\n[%s] thread[%x,%x] on core %d enter / cycle %d\n",
-__FUNCTION__, this->process->pid, this->trdid, this->core->lid , cycle );
-#endif
-
-    uint32_t responses = 1;
-
-    // initialise RPC descriptor header 
-    rpc_desc_t  rpc;
-    rpc.index    = RPC_VFS_DENTRY_DESTROY;
-    rpc.blocking = true;
-    rpc.rsp      = &responses;
-
-    // set input arguments in RPC descriptor 
-    rpc.args[0] = (uint64_t)(intptr_t)dentry;
-    
-    // register RPC request in remote RPC fifo
-    rpc_send( cxy , &rpc );
-
-#if DEBUG_RPC_VFS_DENTRY_DESTROY
-cycle = (uint32_t)hal_get_cycles();
-if( cycle > DEBUG_RPC_VFS_DENTRY_DESTROY )
-printk("\n[%s] thread[%x,%x] on core %d exit / cycle %d\n",
-__FUNCTION__, this->process->pid, this->trdid, this->core->lid, cycle );
-#endif
-}
-
-///////////////////////////////////////////////
-void rpc_vfs_dentry_destroy_server( xptr_t xp )
-{
-#if DEBUG_RPC_VFS_DENTRY_DESTROY
-thread_t * this = CURRENT_THREAD;
-uint32_t cycle = (uint32_t)hal_get_cycles();
-if( cycle > DEBUG_RPC_VFS_DENTRY_DESTROY )
-printk("\n[%s] thread[%x,%x] on core %d enter / cycle %d\n",
-__FUNCTION__, this->process->pid, this->trdid, this->core->lid , cycle );
-#endif
-
-    vfs_dentry_t * dentry;
-
-    // get client cluster identifier and pointer on RPC descriptor
-    cxy_t        client_cxy  = GET_CXY( xp );
-    rpc_desc_t * desc        = GET_PTR( xp );
-
-    // get arguments "dentry" from client RPC descriptor
-    dentry = (vfs_dentry_t *)(intptr_t)hal_remote_l64( XPTR( client_cxy , &desc->args[0] ) );
-                       
-    // call local kernel function
-    vfs_dentry_destroy( dentry );
-
-#if DEBUG_RPC_VFS_DENTRY_DESTROY
-cycle = (uint32_t)hal_get_cycles();
-if( cycle > DEBUG_RPC_VFS_DENTRY_DESTROY )
-printk("\n[%s] thread[%x,%x] on core %d exit / cycle %d\n",
-__FUNCTION__, this->process->pid, this->trdid, this->core->lid, cycle );
-#endif
-}
-
-
-/////////////////////////////////////////////////////////////////////////////////////////
-// [14]          Marshaling functions attached to RPC_VFS_FILE_CREATE  
-/////////////////////////////////////////////////////////////////////////////////////////
-
-//////////////////////////////////////////////////////////////
-void rpc_vfs_file_create_client( cxy_t                  cxy,
-                                 struct vfs_inode_s   * inode,       // in
-                                 uint32_t               file_attr,   // in
-                                 xptr_t               * file_xp,     // out
-                                 error_t              * error )      // out
-{
-#if DEBUG_RPC_VFS_FILE_CREATE
-thread_t * this = CURRENT_THREAD;
-uint32_t cycle = (uint32_t)hal_get_cycles();
-if( cycle > DEBUG_RPC_VFS_FILE_CREATE )
-printk("\n[%s] thread[%x,%x] on core %d enter / cycle %d\n",
-__FUNCTION__, this->process->pid, this->trdid, this->core->lid , cycle );
-#endif
-
-    uint32_t responses = 1;
-
-    // initialise RPC descriptor header 
-    rpc_desc_t  rpc;
-    rpc.index    = RPC_VFS_FILE_CREATE;
-    rpc.blocking = true;
-    rpc.rsp      = &responses;
-
-    // set input arguments in RPC descriptor 
-    rpc.args[0] = (uint64_t)(intptr_t)inode;
-    rpc.args[1] = (uint64_t)file_attr;
-
-    // register RPC request in remote RPC fifo
-    rpc_send( cxy , &rpc );
-
-    // get output values from RPC descriptor
-    *file_xp = (xptr_t)rpc.args[2];
-    *error   = (error_t)rpc.args[3];
-
-#if DEBUG_RPC_VFS_FILE_CREATE
-cycle = (uint32_t)hal_get_cycles();
-if( cycle > DEBUG_RPC_VFS_FILE_CREATE )
-printk("\n[%s] thread[%x,%x] on core %d exit / cycle %d\n",
-__FUNCTION__, this->process->pid, this->trdid, this->core->lid, cycle );
-#endif
-}
-
-////////////////////////////////////////////
-void rpc_vfs_file_create_server( xptr_t xp )
-{
-#if DEBUG_RPC_VFS_FILE_CREATE
-thread_t * this = CURRENT_THREAD;
-uint32_t cycle = (uint32_t)hal_get_cycles();
-if( cycle > DEBUG_RPC_VFS_FILE_CREATE )
-printk("\n[%s] thread[%x,%x] on core %d enter / cycle %d\n",
-__FUNCTION__, this->process->pid, this->trdid, this->core->lid , cycle );
-#endif
-
-    uint32_t      file_attr;
-    vfs_inode_t * inode;
-    xptr_t        file_xp;
-    error_t       error;
-
-    // get client cluster identifier and pointer on RPC descriptor
-    cxy_t        client_cxy  = GET_CXY( xp );
-    rpc_desc_t * desc        = GET_PTR( xp );
-
-    // get arguments "file_attr" and "inode" from client RPC descriptor
-    inode     = (vfs_inode_t *)(intptr_t)hal_remote_l64( XPTR( client_cxy , &desc->args[0] ) );
-    file_attr = (uint32_t)               hal_remote_l64( XPTR( client_cxy , &desc->args[1] ) );
-                       
-    // call local kernel function
-    error = vfs_file_create( inode,
-                             file_attr,
-                             &file_xp );
- 
-    // set output arguments
-    hal_remote_s64( XPTR( client_cxy , &desc->args[2] ) , (uint64_t)file_xp );
-    hal_remote_s64( XPTR( client_cxy , &desc->args[3] ) , (uint64_t)error );
-
-#if DEBUG_RPC_VFS_FILE_CREATE
-cycle = (uint32_t)hal_get_cycles();
-if( cycle > DEBUG_RPC_VFS_FILE_CREATE )
-printk("\n[%s] thread[%x,%x] on core %d exit / cycle %d\n",
-__FUNCTION__, this->process->pid, this->trdid, this->core->lid, cycle );
-#endif
-}
-
-/////////////////////////////////////////////////////////////////////////////////////////
-// [15]          Marshaling functions attached to RPC_VFS_FILE_DESTROY  
-/////////////////////////////////////////////////////////////////////////////////////////
-
-///////////////////////////////////////////////////
-void rpc_vfs_file_destroy_client( cxy_t        cxy,
-                                  vfs_file_t * file )
-{
-#if DEBUG_RPC_VFS_FILE_DESTROY
-thread_t * this = CURRENT_THREAD;
-uint32_t cycle = (uint32_t)hal_get_cycles();
-if( cycle > DEBUG_RPC_VFS_FILE_DESTROY )
-printk("\n[%s] thread[%x,%x] on core %d enter / cycle %d\n",
-__FUNCTION__, this->process->pid, this->trdid, this->core->lid , cycle );
-#endif
-
-    uint32_t responses = 1;
-
-    // initialise RPC descriptor header 
-    rpc_desc_t  rpc;
-    rpc.index    = RPC_VFS_FILE_DESTROY;
-    rpc.blocking = true;
-    rpc.rsp      = &responses;
-
-    // set input arguments in RPC descriptor 
-    rpc.args[0] = (uint64_t)(intptr_t)file;
-    
-    // register RPC request in remote RPC fifo
-    rpc_send( cxy , &rpc );
-
-#if DEBUG_RPC_VFS_FILE_DESTROY
-cycle = (uint32_t)hal_get_cycles();
-if( cycle > DEBUG_RPC_VFS_FILE_DESTROY )
-printk("\n[%s] thread[%x,%x] on core %d exit / cycle %d\n",
-__FUNCTION__, this->process->pid, this->trdid, this->core->lid, cycle );
-#endif
-}
-
-/////////////////////////////////////////////
-void rpc_vfs_file_destroy_server( xptr_t xp )
-{
-#if DEBUG_RPC_VFS_FILE_DESTROY
-thread_t * this = CURRENT_THREAD;
-uint32_t cycle = (uint32_t)hal_get_cycles();
-if( cycle > DEBUG_RPC_VFS_FILE_DESTROY )
-printk("\n[%s] thread[%x,%x] on core %d enter / cycle %d\n",
-__FUNCTION__, this->process->pid, this->trdid, this->core->lid , cycle );
-#endif
-
-    vfs_file_t * file;
-
-    // get client cluster identifier and pointer on RPC descriptor
-    cxy_t        client_cxy  = GET_CXY( xp );
-    rpc_desc_t * desc        = GET_PTR( xp );
-
-    // get arguments "dentry" from client RPC descriptor
-    file = (vfs_file_t *)(intptr_t)hal_remote_l64( XPTR( client_cxy , &desc->args[0] ) );
-                       
-    // call local kernel function
-    vfs_file_destroy( file );
-
-#if DEBUG_RPC_VFS_FILE_DESTROY
-cycle = (uint32_t)hal_get_cycles();
-if( cycle > DEBUG_RPC_VFS_FILE_DESTROY )
-printk("\n[%s] thread[%x,%x] on core %d exit / cycle %d\n",
-__FUNCTION__, this->process->pid, this->trdid, this->core->lid, cycle );
-#endif
-}
-
-/////////////////////////////////////////////////////////////////////////////////////////
-// [16]      Marshaling functions attached to RPC_VFS_FS_GET_DENTRY 
-/////////////////////////////////////////////////////////////////////////////////////////
-
-/////////////////////////////////////////////////////////
-void rpc_vfs_fs_new_dentry_client( cxy_t         cxy,
-                                   vfs_inode_t * parent_inode,    // in
-                                   char        * name,            // in
-                                   xptr_t        child_inode_xp,  // in
-                                   error_t     * error )          // out
-{
-#if DEBUG_RPC_VFS_FS_NEW_DENTRY
-thread_t * this = CURRENT_THREAD;
-uint32_t cycle = (uint32_t)hal_get_cycles();
-if( cycle > DEBUG_RPC_VFS_FS_NEW_DENTRY )
-printk("\n[%s] thread[%x,%x] on core %d enter / cycle %d\n",
-__FUNCTION__, this->process->pid, this->trdid, this->core->lid , cycle );
-#endif
-
-    uint32_t responses = 1;
-
-    // initialise RPC descriptor header 
-    rpc_desc_t  rpc;
-    rpc.index    = RPC_VFS_FS_NEW_DENTRY;
-    rpc.blocking = true;
-    rpc.rsp      = &responses;
-
-    // set input arguments in RPC descriptor 
-    rpc.args[0] = (uint64_t)(intptr_t)parent_inode;
-    rpc.args[1] = (uint64_t)(intptr_t)name;
-    rpc.args[2] = (uint64_t)child_inode_xp;
-
-    // register RPC request in remote RPC fifo
-    rpc_send( cxy , &rpc );
-
-    // get output values from RPC descriptor
-    *error   = (error_t)rpc.args[3];
-
-#if DEBUG_RPC_VFS_FS_NEW_DENTRY
-cycle = (uint32_t)hal_get_cycles();
-if( cycle > DEBUG_RPC_VFS_FS_NEW_DENTRY )
-printk("\n[%s] thread[%x,%x] on core %d exit / cycle %d\n",
-__FUNCTION__, this->process->pid, this->trdid, this->core->lid , cycle );
-#endif
-}
-
-//////////////////////////////////////////////
-void rpc_vfs_fs_new_dentry_server( xptr_t xp )
-{
-#if DEBUG_RPC_VFS_FS_NEW_DENTRY
-thread_t * this = CURRENT_THREAD;
-uint32_t cycle = (uint32_t)hal_get_cycles();
-if( cycle > DEBUG_RPC_VFS_FS_NEW_DENTRY )
-printk("\n[%s] thread[%x,%x] on core %d enter / cycle %d\n",
-__FUNCTION__, this->process->pid, this->trdid, this->core->lid , cycle );
-#endif
-
-    error_t       error;
-    vfs_inode_t * parent;
-    xptr_t        child_xp;
-    char        * name;
-
-    char          name_copy[CONFIG_VFS_MAX_NAME_LENGTH];
-
-    // get client cluster identifier and pointer on RPC descriptor
-    cxy_t        client_cxy  = GET_CXY( xp );
-    rpc_desc_t * desc        = GET_PTR( xp );
-
-    // get arguments "parent", "name", and "child_xp"
-    parent     = (vfs_inode_t*)(intptr_t)hal_remote_l64(XPTR(client_cxy , &desc->args[0]));
-    name       = (char*)(intptr_t)       hal_remote_l64(XPTR(client_cxy , &desc->args[1]));
-    child_xp   = (xptr_t)                hal_remote_l64(XPTR(client_cxy , &desc->args[2]));
-
-    // get name local copy
-    hal_remote_strcpy( XPTR( local_cxy , name_copy ) ,
-                       XPTR( client_cxy , name ) );
-
-    // call the kernel function
-    error = vfs_fs_new_dentry( parent , name_copy , child_xp );
-
-    // set output argument
-    hal_remote_s64( XPTR( client_cxy , &desc->args[3] ) , (uint64_t)error );
-
-#if DEBUG_RPC_VFS_FS_NEW_DENTRY
-cycle = (uint32_t)hal_get_cycles();
-if( cycle > DEBUG_RPC_VFS_FS_NEW_DENTRY )
-printk("\n[%s] thread[%x,%x] on core %d exit / cycle %d\n",
-__FUNCTION__, this->process->pid, this->trdid, this->core->lid , cycle );
-#endif
-}
-
-/////////////////////////////////////////////////////////////////////////////////////////
-// [17]      Marshaling function attached to RPC_VFS_FS_ADD_DENTRY  
-/////////////////////////////////////////////////////////////////////////////////////////
-
-void rpc_vfs_fs_add_dentry_client( cxy_t          cxy,
-                                   vfs_inode_t  * parent,     // in
-                                   vfs_dentry_t * dentry,     // in
-                                   error_t      * error )     // out
-{
-#if DEBUG_RPC_VFS_FS_ADD_DENTRY
-thread_t * this = CURRENT_THREAD;
-uint32_t cycle = (uint32_t)hal_get_cycles();
-if( cycle > DEBUG_RPC_VFS_FS_ADD_DENTRY )
-printk("\n[%s] thread[%x,%x] on core %d enter / cycle %d\n",
-__FUNCTION__, this->process->pid, this->trdid, this->core->lid , cycle );
-#endif
-
-    uint32_t responses = 1;
-
-    // initialise RPC descriptor header 
-    rpc_desc_t  rpc;
-    rpc.index    = RPC_VFS_FS_ADD_DENTRY;
-    rpc.blocking = true;
-    rpc.rsp      = &responses;
-
-    // set input arguments in RPC descriptor 
-    rpc.args[0] = (uint64_t)(intptr_t)parent;
-    rpc.args[1] = (uint64_t)(intptr_t)dentry;
-
-    // register RPC request in remote RPC fifo
-    rpc_send( cxy , &rpc );
-
-    // get output values from RPC descriptor
-    *error   = (error_t)rpc.args[2];
-
-#if DEBUG_RPC_VFS_FS_ADD_DENTRY
-cycle = (uint32_t)hal_get_cycles();
-if( cycle > DEBUG_RPC_VFS_FS_ADD_DENTRY )
-printk("\n[%s] thread[%x,%x] on core %d exit / cycle %d\n",
-__FUNCTION__, this->process->pid, this->trdid, this->core->lid , cycle );
-#endif
-}
-
-//////////////////////////////////////////////
-void rpc_vfs_fs_add_dentry_server( xptr_t xp )
-{
-#if DEBUG_RPC_VFS_FS_ADD_DENTRY
-thread_t * this = CURRENT_THREAD;
-uint32_t cycle = (uint32_t)hal_get_cycles();
-if( cycle > DEBUG_RPC_VFS_FS_ADD_DENTRY )
-printk("\n[%s] thread[%x,%x] on core %d enter / cycle %d\n",
-__FUNCTION__, this->process->pid, this->trdid, this->core->lid , cycle );
-#endif
-
-    error_t        error;
-    vfs_inode_t  * parent;
-    vfs_dentry_t * dentry;
-
-    // get client cluster identifier and pointer on RPC descriptor
-    cxy_t        client_cxy  = GET_CXY( xp );
-    rpc_desc_t * desc        = GET_PTR( xp );
-
-    // get input arguments
-    parent = (vfs_inode_t*)(intptr_t) hal_remote_l64(XPTR(client_cxy , &desc->args[0]));
-    dentry = (vfs_dentry_t*)(intptr_t)hal_remote_l64(XPTR(client_cxy , &desc->args[1]));
-
-    // call the kernel function
-    error = vfs_fs_add_dentry( parent , dentry );
-
-    // set output argument
-    hal_remote_s64( XPTR( client_cxy , &desc->args[2] ) , (uint64_t)error );
-
-#if DEBUG_RPC_VFS_FS_ADD_DENTRY
-cycle = (uint32_t)hal_get_cycles();
-if( cycle > DEBUG_RPC_VFS_FS_ADD_DENTRY )
-printk("\n[%s] thread[%x,%x] on core %d exit / cycle %d\n",
-__FUNCTION__, this->process->pid, this->trdid, this->core->lid , cycle );
-#endif
-}
-
-/////////////////////////////////////////////////////////////////////////////////////////
-// [18]      Marshaling function attached to RPC_VFS_FS_REMOVE_DENTRY 
-/////////////////////////////////////////////////////////////////////////////////////////
-
-void rpc_vfs_fs_remove_dentry_client( cxy_t          cxy,
-                                      vfs_inode_t  * parent,     // in
-                                      vfs_dentry_t * dentry,     // in
-                                      error_t      * error )     // out
-{
-#if DEBUG_RPC_VFS_FS_REMOVE_DENTRY
-thread_t * this = CURRENT_THREAD;
-uint32_t cycle = (uint32_t)hal_get_cycles();
-if( cycle > DEBUG_RPC_VFS_FS_REMOVE_DENTRY )
-printk("\n[%s] thread[%x,%x] on core %d enter / cycle %d\n",
-__FUNCTION__, this->process->pid, this->trdid, this->core->lid , cycle );
-#endif
-
-    uint32_t responses = 1;
-
-    // initialise RPC descriptor header 
-    rpc_desc_t  rpc;
-    rpc.index    = RPC_VFS_FS_REMOVE_DENTRY;
-    rpc.blocking = true;
-    rpc.rsp      = &responses;
-
-    // set input arguments in RPC descriptor 
-    rpc.args[0] = (uint64_t)(intptr_t)parent;
-    rpc.args[1] = (uint64_t)(intptr_t)dentry;
-
-    // register RPC request in remote RPC fifo
-    rpc_send( cxy , &rpc );
-
-    // get output values from RPC descriptor
-    *error   = (error_t)rpc.args[2];
-
-#if DEBUG_RPC_VFS_FS_REMOVE_DENTRY
-cycle = (uint32_t)hal_get_cycles();
-if( cycle > DEBUG_RPC_VFS_FS_REMOVE_DENTRY )
-printk("\n[%s] thread[%x,%x] on core %d exit / cycle %d\n",
-__FUNCTION__, this->process->pid, this->trdid, this->core->lid , cycle );
-#endif
-}
-
-/////////////////////////////////////////////////
-void rpc_vfs_fs_remove_dentry_server( xptr_t xp )
-{
-#if DEBUG_RPC_VFS_FS_REMOVE_DENTRY
-thread_t * this = CURRENT_THREAD;
-uint32_t cycle = (uint32_t)hal_get_cycles();
-if( cycle > DEBUG_RPC_VFS_FS_REMOVE_DENTRY )
-printk("\n[%s] thread[%x,%x] on core %d enter / cycle %d\n",
-__FUNCTION__, this->process->pid, this->trdid, this->core->lid , cycle );
-#endif
-
-    error_t        error;
-    vfs_inode_t  * parent;
-    vfs_dentry_t * dentry;
-
-    // get client cluster identifier and pointer on RPC descriptor
-    cxy_t        client_cxy  = GET_CXY( xp );
-    rpc_desc_t * desc        = GET_PTR( xp );
-
-    // get input arguments
-    parent = (vfs_inode_t*)(intptr_t) hal_remote_l64(XPTR(client_cxy , &desc->args[0]));
-    dentry = (vfs_dentry_t*)(intptr_t)hal_remote_l64(XPTR(client_cxy , &desc->args[1]));
-
-    // call the kernel function
-    error = vfs_fs_remove_dentry( parent , dentry );
-
-    // set output argument
-    hal_remote_s64( XPTR( client_cxy , &desc->args[2] ) , (uint64_t)error );
-
-#if DEBUG_RPC_VFS_FS_REMOVE_DENTRY
-cycle = (uint32_t)hal_get_cycles();
-if( cycle > DEBUG_RPC_VFS_FS_REMOVE_DENTRY )
-printk("\n[%s] thread[%x,%x] on core %d exit / cycle %d\n",
-__FUNCTION__, this->process->pid, this->trdid, this->core->lid , cycle );
-#endif
-}
-
-/////////////////////////////////////////////////////////////////////////////////////////
-// [19]     Marshaling functions attached to RPC_VFS_INODE_LOAD_ALL_PAGES 
-/////////////////////////////////////////////////////////////////////////////////////////
-
-////////////////////////////////////////////////////////////
-void rpc_vfs_inode_load_all_pages_client( cxy_t         cxy,
-                                          vfs_inode_t * inode,      // in
-                                          error_t     * error )     // out
-{
-#if DEBUG_RPC_VFS_INODE_LOAD_ALL_PAGES
-thread_t * this = CURRENT_THREAD;
-uint32_t cycle = (uint32_t)hal_get_cycles();
-if( cycle > DEBUG_RPC_VFS_INODE_LOAD_ALL_PAGES )
-printk("\n[%s] thread[%x,%x] on core %d enter / cycle %d\n",
-__FUNCTION__, this->process->pid, this->trdid, this->core->lid , cycle );
-#endif
-
-    uint32_t responses = 1;
-
-    // initialise RPC descriptor header 
-    rpc_desc_t  rpc;
-    rpc.index    = RPC_VFS_INODE_LOAD_ALL_PAGES;
-    rpc.blocking = true;
-    rpc.rsp      = &responses;
-
-    // set input arguments in RPC descriptor 
-    rpc.args[0] = (uint64_t)(intptr_t)inode;
-
-    // register RPC request in remote RPC fifo
-    rpc_send( cxy , &rpc );
-
-    // get output values from RPC descriptor
-    *error   = (error_t)rpc.args[1];
-
-#if DEBUG_RPC_VFS_INODE_LOAD_ALL_PAGES
-cycle = (uint32_t)hal_get_cycles();
-if( cycle > DEBUG_RPC_VFS_INODE_LOAD_ALL_PAGES )
-printk("\n[%s] thread[%x,%x] on core %d exit / cycle %d\n",
-__FUNCTION__, this->process->pid, this->trdid, this->core->lid , cycle );
-#endif
-}
-
-/////////////////////////////////////////////////////
-void rpc_vfs_inode_load_all_pages_server( xptr_t xp )
-{
-#if DEBUG_RPC_VFS_INODE_LOAD_ALL_PAGES
-thread_t * this = CURRENT_THREAD;
-uint32_t cycle = (uint32_t)hal_get_cycles();
-if( cycle > DEBUG_RPC_VFS_INODE_LOAD_ALL_PAGES )
-printk("\n[%s] thread[%x,%x] on core %d enter / cycle %d\n",
-__FUNCTION__, this->process->pid, this->trdid, this->core->lid , cycle );
-#endif
-
-    error_t       error;
-    vfs_inode_t * inode;
-
-    // get client cluster identifier and pointer on RPC descriptor
-    cxy_t        client_cxy  = GET_CXY( xp );
-    rpc_desc_t * desc        = GET_PTR( xp );
-
-    // get input argument
-    inode = (vfs_inode_t*)(intptr_t)hal_remote_l64(XPTR(client_cxy , &desc->args[0]));
-
-    // call the kernel function
-    error = vfs_inode_load_all_pages( inode );
-
-    // set output argument
-    hal_remote_s64( XPTR( client_cxy , &desc->args[1] ) , (uint64_t)error );
-
-#if DEBUG_RPC_VFS_INODE_LOAD_ALL_PAGES
-cycle = (uint32_t)hal_get_cycles();
-if( cycle > DEBUG_RPC_VFS_INODE_LOAD_ALL_PAGES )
-printk("\n[%s] thread[%x,%x] on core %d exit / cycle %d\n",
-__FUNCTION__, this->process->pid, this->trdid, this->core->lid , cycle );
-#endif
-}
-
-/////////////////////////////////////////////////////////////////////////////////////////
-// [20]          RPC_VMM_GET_VSEG deprecated [AG] sept 2019
-/////////////////////////////////////////////////////////////////////////////////////////
-
-/*
-//////////////////////////////////////////////////
-void rpc_vmm_get_vseg_client( cxy_t       cxy,      
-                              process_t * process,     // in  
-                              intptr_t    vaddr,       // in  
-                              xptr_t    * vseg_xp,     // out
-                              error_t   * error )      // out
-{
-#if DEBUG_RPC_VMM_GET_VSEG
-thread_t * this = CURRENT_THREAD;
-uint32_t cycle = (uint32_t)hal_get_cycles();
-if( cycle > DEBUG_RPC_VMM_GET_VSEG )
-printk("\n[%s] thread[%x,%x] on core %d enter / cycle %d\n",
-__FUNCTION__, this->process->pid, this->trdid, this->core->lid , cycle );
-#endif
-
-    uint32_t responses = 1;
-
-    // initialise RPC descriptor header 
-    rpc_desc_t  rpc;
-    rpc.index    = RPC_VMM_GET_VSEG;
-    rpc.blocking = true;
-    rpc.rsp      = &responses;
-
-    // set input arguments in RPC descriptor 
-    rpc.args[0] = (uint64_t)(intptr_t)process;
-    rpc.args[1] = (uint64_t)vaddr;
-
-    // register RPC request in remote RPC fifo
-    rpc_send( cxy , &rpc );
-
-    // get output argument from rpc descriptor
-    *vseg_xp = rpc.args[2];
-    *error   = (error_t)rpc.args[3];
-
-#if DEBUG_RPC_VMM_GET_VSEG
-cycle = (uint32_t)hal_get_cycles();
-if( cycle > DEBUG_RPC_VMM_GET_VSEG )
-printk("\n[%s] thread[%x,%x] on core %d exit / cycle %d\n",
-__FUNCTION__, this->process->pid, this->trdid, this->core->lid , cycle );
-#endif
-}
-
-/////////////////////////////////////////
-void rpc_vmm_get_vseg_server( xptr_t xp )
-{
-#if DEBUG_RPC_VMM_GET_VSEG
-thread_t * this = CURRENT_THREAD;
-uint32_t cycle = (uint32_t)hal_get_cycles();
-if( cycle > DEBUG_RPC_VMM_GET_VSEG )
-printk("\n[%s] thread[%x,%x] on core %d enter / cycle %d\n",
-__FUNCTION__, this->process->pid, this->trdid, this->core->lid , cycle );
-#endif
-
-    process_t   * process;
-    intptr_t      vaddr;
-    vseg_t      * vseg_ptr;
-    xptr_t        vseg_xp;
-    error_t       error;
-
-    // get client cluster identifier and pointer on RPC descriptor
-    cxy_t        client_cxy  = GET_CXY( xp );
-    rpc_desc_t * desc        = GET_PTR( xp );
-
-    // get input argument from client RPC descriptor
-    process = (process_t *)(intptr_t)hal_remote_l64( XPTR( client_cxy , &desc->args[0] ) );
-    vaddr   = (intptr_t)hal_remote_l64( XPTR( client_cxy , &desc->args[1] ) );
-    
-    // call local kernel function
-    error = vmm_get_vseg( process , vaddr , &vseg_ptr );
-
-    // set output arguments to client RPC descriptor
-    vseg_xp = XPTR( local_cxy , vseg_ptr );
-    hal_remote_s64( XPTR( client_cxy , &desc->args[2] ) , (uint64_t)vseg_xp );
-    hal_remote_s64( XPTR( client_cxy , &desc->args[3] ) , (uint64_t)error );
-
-#if DEBUG_RPC_VMM_GET_VSEG
-cycle = (uint32_t)hal_get_cycles();
-if( cycle > DEBUG_RPC_VMM_GET_VSEG )
-printk("\n[%s] thread[%x,%x] on core %d exit / cycle %d\n",
-__FUNCTION__, this->process->pid, this->trdid, this->core->lid , cycle );
-#endif
-}
-*/
-
-/////////////////////////////////////////////////////////////////////////////////////////
-// [21]    undefined
-/////////////////////////////////////////////////////////////////////////////////////////
-
-/////////////////////////////////////////////////////////////////////////////////////////
-// [22]          RPC_KCM_ALLOC deprecated [AG] sept 2019
-/////////////////////////////////////////////////////////////////////////////////////////
-
-/*
-//////////////////////////////////////////
-void rpc_kcm_alloc_client( cxy_t      cxy,
-                           uint32_t   kmem_type,   // in
-                           xptr_t   * buf_xp )     // out
-{
-#if DEBUG_RPC_KCM_ALLOC
-thread_t * this = CURRENT_THREAD;
-uint32_t cycle = (uint32_t)hal_get_cycles();
-if( cycle > DEBUG_RPC_KCM_ALLOC )
-printk("\n[%s] thread[%x,%x] on core %d enter / cycle %d\n",
-__FUNCTION__, this->process->pid, this->trdid, this->core->lid , cycle );
-#endif
-
-    uint32_t responses = 1;
-
-    // initialise RPC descriptor header 
-    rpc_desc_t  rpc;
-    rpc.index    = RPC_KCM_ALLOC;
-    rpc.blocking = true;
-    rpc.rsp      = &responses;
-
-    // set input arguments in RPC descriptor 
-    rpc.args[0] = (uint64_t)kmem_type;
-
-    // register RPC request in remote RPC fifo
-    rpc_send( cxy , &rpc );
-
-    // get output arguments from RPC descriptor
-    *buf_xp = (xptr_t)rpc.args[1];
-
-#if DEBUG_RPC_KCM_ALLOC
-cycle = (uint32_t)hal_get_cycles();
-if( cycle > DEBUG_RPC_KCM_ALLOC )
-printk("\n[%s] thread[%x,%x] on core %d exit / cycle %d\n",
-__FUNCTION__, this->process->pid, this->trdid, this->core->lid , cycle );
-#endif
-}
-
-//////////////////////////////////////
-void rpc_kcm_alloc_server( xptr_t xp )
-{
-#if DEBUG_RPC_KCM_ALLOC
-thread_t * this = CURRENT_THREAD;
-uint32_t cycle = (uint32_t)hal_get_cycles();
-if( cycle > DEBUG_RPC_KCM_ALLOC )
-printk("\n[%s] thread[%x,%x] on core %d enter / cycle %d\n",
-__FUNCTION__, this->process->pid, this->trdid, this->core->lid , cycle );
-#endif
-
-    // get client cluster identifier and pointer on RPC descriptor
-    cxy_t        client_cxy  = GET_CXY( xp );
-    rpc_desc_t * desc        = GET_PTR( xp );
-
-    // get input argument "kmem_type" from client RPC descriptor
-    uint32_t kmem_type = (uint32_t)hal_remote_l64( XPTR( client_cxy , &desc->args[0] ) );
-
-    // allocates memory for kcm
-    kmem_req_t  req;
-    req.type  = kmem_type;
-    req.flags = AF_ZERO;
-    void * buf_ptr = kmem_alloc( &req );
-
-    // set output argument
-    xptr_t buf_xp = XPTR( local_cxy , buf_ptr );
-    hal_remote_s64( XPTR( client_cxy , &desc->args[1] ) , (uint64_t)buf_xp );
-
-#if DEBUG_RPC_KCM_ALLOC
-cycle = (uint32_t)hal_get_cycles();
-if( cycle > DEBUG_RPC_KCM_ALLOC )
-printk("\n[%s] thread[%x,%x] on core %d exit / cycle %d\n",
-__FUNCTION__, this->process->pid, this->trdid, this->core->lid , cycle );
-#endif
-}   
-*/
-
-/////////////////////////////////////////////////////////////////////////////////////////
-// [23]          RPC_KCM_FREE deprecated [AG] sept 2019
-/////////////////////////////////////////////////////////////////////////////////////////
-
-/*
-/////////////////////////////////////////
-void rpc_kcm_free_client( cxy_t      cxy,
-                          void     * buf,          // in
-                          uint32_t   kmem_type )   // in
-{
-#if DEBUG_RPC_KCM_FREE
-thread_t * this = CURRENT_THREAD;
-uint32_t cycle = (uint32_t)hal_get_cycles();
-if( cycle > DEBUG_RPC_KCM_FREE )
-printk("\n[%s] thread[%x,%x] on core %d enter / cycle %d\n",
-__FUNCTION__, this->process->pid, this->trdid, this->core->lid , cycle );
-#endif
-
-    uint32_t responses = 1;
-
-    // initialise RPC descriptor header 
-    rpc_desc_t  rpc;
-    rpc.index    = RPC_KCM_FREE;
-    rpc.blocking = true;
-    rpc.rsp      = &responses;
-
-    // set input arguments in RPC descriptor 
-    rpc.args[0] = (uint64_t)(intptr_t)buf;
-    rpc.args[1] = (uint64_t)kmem_type;
-
-    // register RPC request in remote RPC fifo
-    rpc_send( cxy , &rpc );
-
-#if DEBUG_RPC_KCM_FREE
-cycle = (uint32_t)hal_get_cycles();
-if( cycle > DEBUG_RPC_KCM_FREE )
-printk("\n[%s] thread[%x,%x] on core %d exit / cycle %d\n",
-__FUNCTION__, this->process->pid, this->trdid, this->core->lid , cycle );
-#endif
-}
-
-/////////////////////////////////////
-void rpc_kcm_free_server( xptr_t xp )
-{
-#if DEBUG_RPC_KCM_FREE
-thread_t * this = CURRENT_THREAD;
-uint32_t cycle = (uint32_t)hal_get_cycles();
-if( cycle > DEBUG_RPC_KCM_FREE )
-printk("\n[%s] thread[%x,%x] on core %d enter / cycle %d\n",
-__FUNCTION__, this->process->pid, this->trdid, this->core->lid , cycle );
-#endif
-
-    // get client cluster identifier and pointer on RPC descriptor
-    cxy_t        client_cxy  = GET_CXY( xp );
-    rpc_desc_t * desc        = GET_PTR( xp );
-
-    // get input arguments "buf" and "kmem_type" from client RPC descriptor
-    void     * buf = (void *)(intptr_t)hal_remote_l64( XPTR( client_cxy , &desc->args[0] ) );
-    uint32_t   kmem_type = (uint32_t)hal_remote_l64( XPTR( client_cxy , &desc->args[1] ) );
-
-    // releases memory
-    kmem_req_t  req;
-    req.type = kmem_type;
-    req.ptr  = buf;
-    kmem_free( &req );
-
-#if DEBUG_RPC_KCM_FREE
-cycle = (uint32_t)hal_get_cycles();
-if( cycle > DEBUG_RPC_KCM_FREE )
-printk("\n[%s] thread[%x,%x] on core %d exit / cycle %d\n",
-__FUNCTION__, this->process->pid, this->trdid, this->core->lid , cycle );
-#endif
-}   
-*/
-
-/////////////////////////////////////////////////////////////////////////////////////////
-// [24]          Marshaling functions attached to RPC_MAPPER_SYNC 
-/////////////////////////////////////////////////////////////////////////////////////////
-
-///////////////////////////////////////////////////
-void rpc_mapper_sync_client( cxy_t             cxy,
-                             struct mapper_s * mapper,
-                             error_t         * error )
-{
-#if DEBUG_RPC_MAPPER_SYNC
-thread_t * this = CURRENT_THREAD;
-uint32_t cycle = (uint32_t)hal_get_cycles();
-if( cycle > DEBUG_RPC_MAPPER_SYNC )
-printk("\n[%s] thread[%x,%x] on core %d enter / cycle %d\n",
-__FUNCTION__, this->process->pid, this->trdid, this->core->lid , cycle );
-#endif
-
-    uint32_t responses = 1;
-
-    // initialise RPC descriptor header 
-    rpc_desc_t  rpc;
-    rpc.index    = RPC_MAPPER_SYNC;
-    rpc.blocking = true;
-    rpc.rsp      = &responses;
-
-    // set input arguments in RPC descriptor 
-    rpc.args[0] = (uint64_t)(intptr_t)mapper;
-
-    // register RPC request in remote RPC fifo
-    rpc_send( cxy , &rpc );
-
-    // get output values from RPC descriptor
-    *error   = (error_t)rpc.args[1];
-
-#if DEBUG_RPC_MAPPER_SYNC
-cycle = (uint32_t)hal_get_cycles();
-if( cycle > DEBUG_RPC_MAPPER_SYNC )
-printk("\n[%s] thread[%x,%x] on core %d exit / cycle %d\n",
-__FUNCTION__, this->process->pid, this->trdid, this->core->lid , cycle );
-#endif
-}
-
-////////////////////////////////////////
-void rpc_mapper_sync_server( xptr_t xp )
-{
-#if DEBUG_RPC_MAPPER_SYNC
-thread_t * this = CURRENT_THREAD;
-uint32_t cycle = (uint32_t)hal_get_cycles();
-if( cycle > DEBUG_RPC_MAPPER_SYNC )
-printk("\n[%s] thread[%x,%x] on core %d enter / cycle %d\n",
-__FUNCTION__, this->process->pid, this->trdid, this->core->lid , cycle );
-#endif
-
-    mapper_t * mapper;
-    error_t    error;
-
-    // get client cluster identifier and pointer on RPC descriptor
-    cxy_t        client_cxy  = GET_CXY( xp );
-    rpc_desc_t * desc        = GET_PTR( xp );
-
-    // get arguments from client RPC descriptor
-    mapper  = (mapper_t *)(intptr_t)hal_remote_l64( XPTR( client_cxy , &desc->args[0] ) );
-
-    // call local kernel function
-    error = mapper_sync( mapper );
-
-    // set output argument to client RPC descriptor
-    hal_remote_s64( XPTR( client_cxy , &desc->args[1] ) , (uint64_t)error );
-
-#if DEBUG_RPC_MAPPER_SYNC
-cycle = (uint32_t)hal_get_cycles();
-if( cycle > DEBUG_RPC_MAPPER_SYNC )
-printk("\n[%s] thread[%x,%x] on core %d exit / cycle %d\n",
-__FUNCTION__, this->process->pid, this->trdid, this->core->lid , cycle );
-#endif
-}
-
-/////////////////////////////////////////////////////////////////////////////////////////
-// [25]          Marshaling functions attached to RPC_VMM_RESIZE_VSEG 
+} 
+
+/////////////////////////////////////////////////////////////////////////////////////////
+// [10]          undefined                                          
+/////////////////////////////////////////////////////////////////////////////////////////
+
+/////////////////////////////////////////////////////////////////////////////////////////
+// [11]          undefined                                          
+/////////////////////////////////////////////////////////////////////////////////////////
+
+/////////////////////////////////////////////////////////////////////////////////////////
+// [12]          undefined                                         
+/////////////////////////////////////////////////////////////////////////////////////////
+
+/////////////////////////////////////////////////////////////////////////////////////////
+// [13]          undefined                                        
+/////////////////////////////////////////////////////////////////////////////////////////
+
+/////////////////////////////////////////////////////////////////////////////////////////
+// [14]          undefined                                        
+/////////////////////////////////////////////////////////////////////////////////////////
+
+/////////////////////////////////////////////////////////////////////////////////////////
+// [15]          Marshaling functions attached to RPC_VMM_RESIZE_VSEG 
 /////////////////////////////////////////////////////////////////////////////////////////
 
@@ -2478,5 +1066,5 @@
 
 /////////////////////////////////////////////////////////////////////////////////////////
-// [26]  Marshaling functions attached to RPC_VMM_REMOVE_VSEG 
+// [16]  Marshaling functions attached to RPC_VMM_REMOVE_VSEG 
 /////////////////////////////////////////////////////////////////////////////////////////
 
@@ -2560,5 +1148,5 @@
 
 /////////////////////////////////////////////////////////////////////////////////////////
-// [27]          Marshaling functions attached to RPC_VMM_CREATE_VSEG 
+// [17]          Marshaling functions attached to RPC_VMM_CREATE_VSEG 
 /////////////////////////////////////////////////////////////////////////////////////////
 
@@ -2662,5 +1250,5 @@
 
 /////////////////////////////////////////////////////////////////////////////////////////
-// [28]          Marshaling functions attached to RPC_VMM_SET_COW 
+// [18]          Marshaling functions attached to RPC_VMM_SET_COW 
 /////////////////////////////////////////////////////////////////////////////////////////
 
@@ -2730,10 +1318,295 @@
 }
 
+
+
+/////////////////////////////////////////////////////////////////////////////////////////
+/////////////////////////////////////////////////////////////////////////////////////////
+//                            DEPRECATED RPCs
+/////////////////////////////////////////////////////////////////////////////////////////
+/////////////////////////////////////////////////////////////////////////////////////////
+
+/*
+
+/////////////////////////////////////////////////////////////////////////////////////////
+// [0]       RPC_PMEM_GET_PAGES deprecated [AG] May 2019
+/////////////////////////////////////////////////////////////////////////////////////////
+void rpc_pmem_get_pages_client( cxy_t      cxy,
+                                uint32_t   order,      // in 
+                                page_t  ** page )      // out 
+{
+#if DEBUG_RPC_PMEM_GET_PAGES
+thread_t * this = CURRENT_THREAD;
+uint32_t cycle = (uint32_t)hal_get_cycles();
+if( cycle > DEBUG_RPC_PMEM_GET_PAGES )
+printk("\n[%s] thread[%x,%x] on core %d enter / cycle %d\n",
+__FUNCTION__, this->process->pid, this->trdid, this->core->lid, cycle );
+#endif
+
+    uint32_t responses = 1;
+
+    // initialise RPC descriptor header 
+    rpc_desc_t  rpc;
+    rpc.index     = RPC_PMEM_GET_PAGES;
+    rpc.blocking  = true;
+    rpc.rsp       = &responses;
+
+    // set input arguments in RPC descriptor 
+    rpc.args[0] = (uint64_t)order;
+
+    // register RPC request in remote RPC fifo
+    rpc_send( cxy , &rpc );
+
+    // get output arguments from RPC descriptor
+    *page = (page_t *)(intptr_t)rpc.args[1];
+
+#if DEBUG_RPC_PMEM_GET_PAGES
+cycle = (uint32_t)hal_get_cycles();
+if( cycle > DEBUG_RPC_PMEM_GET_PAGES )
+printk("\n[%s] thread[%x,%x] on core %d exit / cycle %d\n",
+__FUNCTION__, this->process->pid, this->trdid, this->core->lid, cycle );
+#endif
+}
+
+///////////////////////////////////////////
+void rpc_pmem_get_pages_server( xptr_t xp )
+{
+#if DEBUG_RPC_PMEM_GET_PAGES
+thread_t * this = CURRENT_THREAD;
+uint32_t cycle = (uint32_t)hal_get_cycles();
+if( cycle > DEBUG_RPC_PMEM_GET_PAGES )
+printk("\n[%s] thread[%x,%x] on core %d enter / cycle %d\n",
+__FUNCTION__, this->process->pid, this->trdid, this->core->lid, cycle );
+#endif
+
+    // get client cluster identifier and pointer on RPC descriptor
+    cxy_t        cxy  = GET_CXY( xp );
+    rpc_desc_t * desc = GET_PTR( xp );
+
+    // get input arguments from client RPC descriptor
+    uint32_t order = (uint32_t)hal_remote_l64( XPTR( cxy , &desc->args[0] ) );
+    
+    // call local pmem allocator
+    page_t * page = ppm_alloc_pages( order ); 
+
+    // set output arguments into client RPC descriptor
+    hal_remote_s64( XPTR( cxy , &desc->args[1] ) , (uint64_t)(intptr_t)page );
+
+#if DEBUG_RPC_PMEM_GET_PAGES
+cycle = (uint32_t)hal_get_cycles();
+if( cycle > DEBUG_RPC_PMEM_GET_PAGES )
+printk("\n[%s] thread[%x,%x] on core %d exit / cycle %d\n",
+__FUNCTION__, this->process->pid, this->trdid, this->core->lid, cycle );
+#endif
+}
+
+/////////////////////////////////////////////////////////////////////////////////////////
+// [1]       RPC_PMEM_RELEASE_PAGES deprecated [AG] may 2019
+/////////////////////////////////////////////////////////////////////////////////////////
+void rpc_pmem_release_pages_client( cxy_t     cxy,
+                                    page_t  * page )      // out 
+{
+#if DEBUG_RPC_PMEM_RELEASE_PAGES
+thread_t * this = CURRENT_THREAD;
+uint32_t cycle = (uint32_t)hal_get_cycles();
+if( cycle > DEBUG_RPC_PMEM_RELEASE_PAGES )
+printk("\n[%s] thread[%x,%x] on core %d enter / cycle %d\n",
+__FUNCTION__, this->process->pid, this->trdid, this->core->lid , cycle );
+#endif
+
+    uint32_t responses = 1;
+
+    // initialise RPC descriptor header 
+    rpc_desc_t  rpc;
+    rpc.index    = RPC_PMEM_RELEASE_PAGES;
+    rpc.blocking = true;
+    rpc.rsp      = &responses;
+
+    // set input arguments in RPC descriptor 
+    rpc.args[0] = (uint64_t)(intptr_t)page;
+
+    // register RPC request in remote RPC fifo
+    rpc_send( cxy , &rpc );
+
+#if DEBUG_RPC_PMEM_RELEASE_PAGES
+cycle = (uint32_t)hal_get_cycles();
+if( cycle > DEBUG_RPC_PMEM_RELEASE_PAGES )
+printk("\n[%s] thread[%x,%x] on core %d exit / cycle %d\n",
+__FUNCTION__, this->process->pid, this->trdid, this->core->lid, cycle );
+#endif
+}
+
+///////////////////////////////////////////////
+void rpc_pmem_release_pages_server( xptr_t xp )
+{
+#if DEBUG_RPC_PMEM_RELEASE_PAGES
+thread_t * this = CURRENT_THREAD;
+uint32_t cycle = (uint32_t)hal_get_cycles();
+if( cycle > DEBUG_RPC_PMEM_RELEASE_PAGES )
+printk("\n[%s] thread[%x,%x] on core %d enter / cycle %d\n",
+__FUNCTION__, this->process->pid, this->trdid, this->core->lid , cycle );
+#endif
+
+    // get client cluster identifier and pointer on RPC descriptor
+    cxy_t        cxy  = GET_CXY( xp );
+    rpc_desc_t * desc = GET_PTR( xp );
+
+    // get input arguments from client RPC descriptor
+    page_t * page = (page_t *)(intptr_t)hal_remote_l64( XPTR( cxy , &desc->args[0] ) );
+    
+    // release memory to local pmem 
+    kmem_req_t req;
+    req.type = KMEM_PPM;
+    req.ptr  = page;
+    kmem_free( &req );
+
+#if DEBUG_RPC_PMEM_RELEASE_PAGES
+cycle = (uint32_t)hal_get_cycles();
+if( cycle > DEBUG_RPC_PMEM_RELEASE_PAGES )
+printk("\n[%s] thread[%x,%x] on core %d exit / cycle %d\n",
+__FUNCTION__, this->process->pid, this->trdid, this->core->lid, cycle );
+#endif
+}
+
+/////////////////////////////////////////////////////////////////////////////////////////
+// [2]          RPC_PPM_DISPLAY deprecated [AG] May 2019    
+/////////////////////////////////////////////////////////////////////////////////////////
+void rpc_ppm_display_client( cxy_t  cxy )
+{
+#if DEBUG_RPC_PPM_DISPLAY
+thread_t * this = CURRENT_THREAD;
+uint32_t cycle = (uint32_t)hal_get_cycles();
+if( cycle > DEBUG_RPC_PPM_DISPLAY )
+printk("\n[%s] thread[%x,%x] on core %d enter / cycle %d\n",
+__FUNCTION__, this->process->pid, this->trdid, this->core->lid , cycle );
+#endif
+
+    uint32_t responses = 1;
+
+    // initialise RPC descriptor header 
+    rpc_desc_t  rpc;
+    rpc.index    = RPC_PPM_DISPLAY;
+    rpc.blocking = true;
+    rpc.rsp      = &responses;
+
+    // register RPC request in remote RPC fifo
+    rpc_send( cxy , &rpc );
+
+#if DEBUG_RPC_PPM_DISPLAY
+cycle = (uint32_t)hal_get_cycles();
+if( cycle > DEBUG_RPC_PPM_DISPLAY )
+printk("\n[%s] thread[%x,%x] on core %d exit / cycle %d\n",
+__FUNCTION__, this->process->pid, this->trdid, this->core->lid, cycle );
+#endif
+}
+
+////////////////////////////////////////////////////////////////////
+void rpc_ppm_display_server( xptr_t __attribute__((__unused__)) xp )
+{
+#if DEBUG_RPC_PPM_DISPLAY
+thread_t * this = CURRENT_THREAD;
+uint32_t cycle = (uint32_t)hal_get_cycles();
+if( cycle > DEBUG_RPC_PPM_DISPLAY )
+printk("\n[%s] thread[%x,%x] on core %d enter / cycle %d\n",
+__FUNCTION__, this->process->pid, this->trdid, this->core->lid , cycle );
+#endif
+
+    // call local kernel function
+    ppm_display();
+
+#if DEBUG_RPC_PPM_DISPLAY
+cycle = (uint32_t)hal_get_cycles();
+if( cycle > DEBUG_RPC_PPM_DISPLAY )
+printk("\n[%s] thread[%x,%x] on core %d exit / cycle %d\n",
+__FUNCTION__, this->process->pid, this->trdid, this->core->lid, cycle );
+#endif
+}
+
+/////////////////////////////////////////////////////////////////////////////////////////
+// [8]   RPC_VFS_FS_UPDATE_DENTRY deprecated [AG] dec 2019
+/////////////////////////////////////////////////////////////////////////////////////////
+void rpc_vfs_fs_update_dentry_client( cxy_t          cxy,
+                                      vfs_inode_t  * inode,
+                                      vfs_dentry_t * dentry,
+                                      uint32_t       size,
+                                      error_t      * error )
+{
+#if DEBUG_RPC_VFS_FS_UPDATE_DENTRY
+thread_t * this = CURRENT_THREAD;
+uint32_t cycle = (uint32_t)hal_get_cycles();
+if( cycle > DEBUG_RPC_VFS_FS_UPDATE_DENTRY )
+printk("\n[%s] thread[%x,%x] on core %d enter / cycle %d\n",
+__FUNCTION__, this->process->pid, this->trdid, this->core->lid , cycle );
+#endif
+
+    uint32_t responses = 1;
+
+    // initialise RPC descriptor header 
+    rpc_desc_t  rpc;
+    rpc.index    = RPC_VFS_FS_UPDATE_DENTRY;
+    rpc.blocking = true;
+    rpc.rsp      = &responses;
+
+    // set input arguments in RPC descriptor 
+    rpc.args[0] = (uint64_t)(intptr_t)inode;
+    rpc.args[1] = (uint64_t)(intptr_t)dentry;
+    rpc.args[2] = (uint64_t)size;
+
+    // register RPC request in remote RPC fifo
+    rpc_send( cxy , &rpc );
+
+    // get output values from RPC descriptor
+    *error   = (error_t)rpc.args[3];
+
+#if DEBUG_RPC_VFS_FS_UPDATE_DENTRY
+cycle = (uint32_t)hal_get_cycles();
+if( cycle > DEBUG_RPC_VFS_FS_UPDATE_DENTRY )
+printk("\n[%s] thread[%x,%x] on core %d exit / cycle %d\n",
+__FUNCTION__, this->process->pid, this->trdid, this->core->lid , cycle );
+#endif
+}
+
+/////////////////////////////////////////////////
+void rpc_vfs_fs_update_dentry_server( xptr_t xp )
+{
+#if DEBUG_RPC_VFS_FS_UPDATE_DENTRY
+thread_t * this = CURRENT_THREAD;
+uint32_t cycle = (uint32_t)hal_get_cycles();
+if( cycle > DEBUG_RPC_VFS_FS_UPDATE_DENTRY )
+printk("\n[%s] thread[%x,%x] on core %d enter / cycle %d\n",
+__FUNCTION__, this->process->pid, this->trdid, this->core->lid , cycle );
+#endif
+
+    error_t        error;
+    vfs_inode_t  * inode;
+    vfs_dentry_t * dentry;
+    uint32_t       size;
+
+    // get client cluster identifier and pointer on RPC descriptor
+    cxy_t        client_cxy  = GET_CXY( xp );
+    rpc_desc_t * desc        = GET_PTR( xp );
+
+    // get input arguments
+    inode  = (vfs_inode_t*)(intptr_t) hal_remote_l64(XPTR(client_cxy , &desc->args[0]));
+    dentry = (vfs_dentry_t*)(intptr_t)hal_remote_l64(XPTR(client_cxy , &desc->args[1]));
+    size   = (uint32_t)               hal_remote_l64(XPTR(client_cxy , &desc->args[2]));
+
+    // call the kernel function
+    error = vfs_fs_update_dentry( inode , dentry , size );
+
+    // set output argument
+    hal_remote_s64( XPTR( client_cxy , &desc->args[3] ) , (uint64_t)error );
+
+#if DEBUG_RPC_VFS_FS_UPDATE_DENTRY
+cycle = (uint32_t)hal_get_cycles();
+if( cycle > DEBUG_RPC_VFS_FS_UPDATE_DENTRY )
+printk("\n[%s] thread[%x,%x] on core %d exit / cycle %d\n",
+__FUNCTION__, this->process->pid, this->trdid, this->core->lid , cycle );
+#endif
+}
+
+
 /////////////////////////////////////////////////////////////////////////////////////////
 // [29]      RPC_VMM_DISPLAY deprecated [AG] June 2019
 /////////////////////////////////////////////////////////////////////////////////////////
-
-/*
-/////////////////////////////////////////////
 void rpc_hal_vmm_display_client( cxy_t       cxy,
                              process_t * process,
@@ -2804,3 +1677,1187 @@
 }
 
+/////////////////////////////////////////////////////////////////////////////////////////
+// [10]  to RPC_VFS_INODE_CREATE   deprecated [AG] dec 2019
+/////////////////////////////////////////////////////////////////////////////////////////
+void rpc_vfs_inode_create_client( cxy_t          cxy,     
+                                  uint32_t       fs_type,    // in
+                                  uint32_t       attr,       // in
+                                  uint32_t       rights,     // in
+                                  uint32_t       uid,        // in
+                                  uint32_t       gid,        // in
+                                  xptr_t       * inode_xp,   // out
+                                  error_t      * error )     // out
+{
+#if DEBUG_RPC_VFS_INODE_CREATE
+thread_t * this = CURRENT_THREAD;
+uint32_t cycle = (uint32_t)hal_get_cycles();
+if( cycle > DEBUG_RPC_VFS_INODE_CREATE )
+printk("\n[%s] thread[%x,%x] on core %d enter / cycle %d\n",
+__FUNCTION__, this->process->pid, this->trdid, this->core->lid , cycle );
+#endif
+
+    uint32_t responses = 1;
+
+    // initialise RPC descriptor header 
+    rpc_desc_t  rpc;
+    rpc.index    = RPC_VFS_INODE_CREATE;
+    rpc.blocking = true;
+    rpc.rsp      = &responses;
+
+    // set input arguments in RPC descriptor 
+    rpc.args[0] = (uint64_t)fs_type;
+    rpc.args[1] = (uint64_t)attr;
+    rpc.args[2] = (uint64_t)rights;
+    rpc.args[3] = (uint64_t)uid;
+    rpc.args[4] = (uint64_t)gid;
+
+    // register RPC request in remote RPC fifo
+    rpc_send( cxy , &rpc );
+
+    // get output values from RPC descriptor
+    *inode_xp = (xptr_t)rpc.args[5];
+    *error    = (error_t)rpc.args[6];
+
+#if DEBUG_RPC_VFS_INODE_CREATE
+cycle = (uint32_t)hal_get_cycles();
+if( cycle > DEBUG_RPC_VFS_INODE_CREATE )
+printk("\n[%s] thread[%x,%x] on core %d exit / cycle %d\n",
+__FUNCTION__, this->process->pid, this->trdid, this->core->lid, cycle );
+#endif
+}
+
+/////////////////////////////////////////////
+void rpc_vfs_inode_create_server( xptr_t xp )
+{
+#if DEBUG_RPC_VFS_INODE_CREATE
+thread_t * this = CURRENT_THREAD;
+uint32_t cycle = (uint32_t)hal_get_cycles();
+if( cycle > DEBUG_RPC_VFS_INODE_CREATE )
+printk("\n[%s] thread[%x,%x] on core %d enter / cycle %d\n",
+__FUNCTION__, this->process->pid, this->trdid, this->core->lid, cycle );
+#endif
+
+    uint32_t         fs_type;
+    uint32_t         attr;
+    uint32_t         rights;
+    uint32_t         uid;
+    uint32_t         gid;
+    xptr_t           inode_xp;
+    error_t          error;
+
+    // get client cluster identifier and pointer on RPC descriptor
+    cxy_t        client_cxy  = GET_CXY( xp );
+    rpc_desc_t * desc        = GET_PTR( xp );
+
+    // get input arguments from client rpc descriptor
+    fs_type    = (uint32_t)  hal_remote_l64( XPTR( client_cxy , &desc->args[0] ) );
+    attr       = (uint32_t)  hal_remote_l64( XPTR( client_cxy , &desc->args[1] ) );
+    rights     = (uint32_t)  hal_remote_l64( XPTR( client_cxy , &desc->args[2] ) );
+    uid        = (uid_t)     hal_remote_l64( XPTR( client_cxy , &desc->args[3] ) );
+    gid        = (gid_t)     hal_remote_l64( XPTR( client_cxy , &desc->args[4] ) );
+
+    // call local kernel function
+    error = vfs_inode_create( fs_type,
+                              attr,
+                              rights,
+                              uid,
+                              gid,
+                              &inode_xp );
+
+    // set output arguments
+    hal_remote_s64( XPTR( client_cxy , &desc->args[5] ) , (uint64_t)inode_xp );
+    hal_remote_s64( XPTR( client_cxy , &desc->args[6] ) , (uint64_t)error );
+
+#if DEBUG_RPC_VFS_INODE_CREATE
+cycle = (uint32_t)hal_get_cycles();
+if( cycle > DEBUG_RPC_VFS_INODE_CREATE )
+printk("\n[%s] thread[%x,%x] on core %d exit / cycle %d\n",
+__FUNCTION__, this->process->pid, this->trdid, this->core->lid, cycle );
+#endif
+}
+
+/////////////////////////////////////////////////////////////////////////////////////////
+// [11]  to RPC_VFS_INODE_DESTROY   deprecated [AG] dec 2019
+/////////////////////////////////////////////////////////////////////////////////////////
+void rpc_vfs_inode_destroy_client( cxy_t                cxy,
+                                   struct vfs_inode_s * inode )
+{
+#if DEBUG_RPC_VFS_INODE_DESTROY
+thread_t * this = CURRENT_THREAD;
+uint32_t cycle = (uint32_t)hal_get_cycles();
+if( cycle > DEBUG_RPC_VFS_INODE_DESTROY )
+printk("\n[%s] thread[%x,%x] on core %d enter / cycle %d\n",
+__FUNCTION__, this->process->pid, this->trdid, this->core->lid, cycle );
+#endif
+
+    uint32_t responses = 1;
+
+    // initialise RPC descriptor header 
+    rpc_desc_t  rpc;
+    rpc.index    = RPC_VFS_INODE_DESTROY;
+    rpc.blocking = true;
+    rpc.rsp      = &responses;
+
+    // set input arguments in RPC descriptor 
+    rpc.args[0] = (uint64_t)(intptr_t)inode;
+    
+    // register RPC request in remote RPC fifo
+    rpc_send( cxy , &rpc );
+
+#if DEBUG_RPC_VFS_INODE_DESTROY
+cycle = (uint32_t)hal_get_cycles();
+if( cycle > DEBUG_RPC_VFS_INODE_DESTROY )
+printk("\n[%s] thread[%x,%x] on core %d exit / cycle %d\n",
+__FUNCTION__, this->process->pid, this->trdid, this->core->lid, cycle );
+#endif
+}
+
+//////////////////////////////////////////////
+void rpc_vfs_inode_destroy_server( xptr_t xp )
+{
+#if DEBUG_RPC_VFS_INODE_DESTROY
+thread_t * this = CURRENT_THREAD;
+uint32_t cycle = (uint32_t)hal_get_cycles();
+if( cycle > DEBUG_RPC_VFS_INODE_DESTROY )
+printk("\n[%s] thread[%x,%x] on core %d enter / cycle %d\n",
+__FUNCTION__, this->process->pid, this->trdid, this->core->lid, cycle );
+#endif
+
+    vfs_inode_t * inode;
+
+    // get client cluster identifier and pointer on RPC descriptor
+    cxy_t        client_cxy  = GET_CXY( xp );
+    rpc_desc_t * desc        = GET_PTR( xp );
+
+    // get argument "inode" from client RPC descriptor
+    inode = (vfs_inode_t *)(intptr_t)hal_remote_l64( XPTR( client_cxy , &desc->args[0] ) );
+                       
+    // call local kernel function
+    vfs_inode_destroy( inode );
+
+#if DEBUG_RPC_VFS_INODE_DESTROY
+cycle = (uint32_t)hal_get_cycles();
+if( cycle > DEBUG_RPC_VFS_INODE_DESTROY )
+printk("\n[%s] thread[%x,%x] on core %d exit / cycle %d\n",
+__FUNCTION__, this->process->pid, this->trdid, this->core->lid, cycle );
+#endif
+}
+
+/////////////////////////////////////////////////////////////////////////////////////////
+// [12]  RPC_VFS_DENTRY_CREATE   deprecated [AG] dec 2019
+/////////////////////////////////////////////////////////////////////////////////////////
+void rpc_vfs_dentry_create_client( cxy_t                  cxy,
+                                   uint32_t               type,         // in
+                                   char                 * name,         // in
+                                   xptr_t               * dentry_xp,    // out
+                                   error_t              * error )       // out
+{
+#if DEBUG_RPC_VFS_DENTRY_CREATE
+thread_t * this = CURRENT_THREAD;
+uint32_t cycle = (uint32_t)hal_get_cycles();
+if( cycle > DEBUG_RPC_VFS_DENTRY_CREATE )
+printk("\n[%s] thread[%x,%x] on core %d enter / cycle %d\n",
+__FUNCTION__, this->process->pid, this->trdid, this->core->lid, cycle );
+#endif
+
+    uint32_t responses = 1;
+
+    // initialise RPC descriptor header 
+    rpc_desc_t  rpc;
+    rpc.index    = RPC_VFS_DENTRY_CREATE;
+    rpc.blocking = true;
+    rpc.rsp      = &responses;
+
+    // set input arguments in RPC descriptor 
+    rpc.args[0] = (uint64_t)type;
+    rpc.args[1] = (uint64_t)(intptr_t)name;
+
+    // register RPC request in remote RPC fifo
+    rpc_send( cxy , &rpc );
+
+    // get output values from RPC descriptor
+    *dentry_xp = (xptr_t)rpc.args[2];
+    *error     = (error_t)rpc.args[3];
+
+#if DEBUG_RPC_VFS_DENTRY_CREATE
+cycle = (uint32_t)hal_get_cycles();
+if( cycle > DEBUG_RPC_VFS_DENTRY_CREATE )
+printk("\n[%s] thread[%x,%x] on core %d exit / cycle %d\n",
+__FUNCTION__, this->process->pid, this->trdid, this->core->lid, cycle );
+#endif
+}
+
+//////////////////////////////////////////////
+void rpc_vfs_dentry_create_server( xptr_t xp )
+{
+#if DEBUG_RPC_VFS_DENTRY_CREATE
+thread_t * this = CURRENT_THREAD;
+uint32_t cycle = (uint32_t)hal_get_cycles();
+if( cycle > DEBUG_RPC_VFS_DENTRY_CREATE )
+printk("\n[%s] thread[%x,%x] on core %d enter / cycle %d\n",
+__FUNCTION__, this->process->pid, this->trdid, this->core->lid , cycle );
+#endif
+
+    uint32_t      type;
+    char        * name;
+    xptr_t        dentry_xp;
+    error_t       error;
+    char          name_copy[CONFIG_VFS_MAX_NAME_LENGTH];
+
+    // get client cluster identifier and pointer on RPC descriptor
+    cxy_t        client_cxy  = GET_CXY( xp );
+    rpc_desc_t * desc        = GET_PTR( xp );
+
+    // get arguments "name", "type", and "parent" from client RPC descriptor
+    type   = (uint32_t)         hal_remote_l64( XPTR( client_cxy , &desc->args[0] ) );
+    name   = (char *)(intptr_t) hal_remote_l64( XPTR( client_cxy , &desc->args[1] ) );
+
+    // makes a local copy of  name
+    hal_remote_strcpy( XPTR( local_cxy , name_copy ),
+                       XPTR( client_cxy , name ) );
+
+    // call local kernel function
+    error = vfs_dentry_create( type,
+                               name_copy,
+                               &dentry_xp );
+    // set output arguments
+    hal_remote_s64( XPTR( client_cxy , &desc->args[2] ) , (uint64_t)dentry_xp );
+    hal_remote_s64( XPTR( client_cxy , &desc->args[3] ) , (uint64_t)error );
+
+#if DEBUG_RPC_VFS_DENTRY_CREATE
+cycle = (uint32_t)hal_get_cycles();
+if( cycle > DEBUG_RPC_VFS_DENTRY_CREATE )
+printk("\n[%s] thread[%x,%x] on core %d exit / cycle %d\n",
+__FUNCTION__, this->process->pid, this->trdid, this->core->lid, cycle );
+#endif
+}
+
+/////////////////////////////////////////////////////////////////////////////////////////
+// [13]  RPC_VFS_DENTRY_DESTROY   deprecated [AG] dec 2019
+/////////////////////////////////////////////////////////////////////////////////////////
+void rpc_vfs_dentry_destroy_client( cxy_t          cxy,
+                                    vfs_dentry_t * dentry )
+{
+#if DEBUG_RPC_VFS_DENTRY_DESTROY
+thread_t * this = CURRENT_THREAD;
+uint32_t cycle = (uint32_t)hal_get_cycles();
+if( cycle > DEBUG_RPC_VFS_DENTRY_DESTROY )
+printk("\n[%s] thread[%x,%x] on core %d enter / cycle %d\n",
+__FUNCTION__, this->process->pid, this->trdid, this->core->lid , cycle );
+#endif
+
+    uint32_t responses = 1;
+
+    // initialise RPC descriptor header 
+    rpc_desc_t  rpc;
+    rpc.index    = RPC_VFS_DENTRY_DESTROY;
+    rpc.blocking = true;
+    rpc.rsp      = &responses;
+
+    // set input arguments in RPC descriptor 
+    rpc.args[0] = (uint64_t)(intptr_t)dentry;
+    
+    // register RPC request in remote RPC fifo
+    rpc_send( cxy , &rpc );
+
+#if DEBUG_RPC_VFS_DENTRY_DESTROY
+cycle = (uint32_t)hal_get_cycles();
+if( cycle > DEBUG_RPC_VFS_DENTRY_DESTROY )
+printk("\n[%s] thread[%x,%x] on core %d exit / cycle %d\n",
+__FUNCTION__, this->process->pid, this->trdid, this->core->lid, cycle );
+#endif
+}
+
+///////////////////////////////////////////////
+void rpc_vfs_dentry_destroy_server( xptr_t xp )
+{
+#if DEBUG_RPC_VFS_DENTRY_DESTROY
+thread_t * this = CURRENT_THREAD;
+uint32_t cycle = (uint32_t)hal_get_cycles();
+if( cycle > DEBUG_RPC_VFS_DENTRY_DESTROY )
+printk("\n[%s] thread[%x,%x] on core %d enter / cycle %d\n",
+__FUNCTION__, this->process->pid, this->trdid, this->core->lid , cycle );
+#endif
+
+    vfs_dentry_t * dentry;
+
+    // get client cluster identifier and pointer on RPC descriptor
+    cxy_t        client_cxy  = GET_CXY( xp );
+    rpc_desc_t * desc        = GET_PTR( xp );
+
+    // get arguments "dentry" from client RPC descriptor
+    dentry = (vfs_dentry_t *)(intptr_t)hal_remote_l64( XPTR( client_cxy , &desc->args[0] ) );
+                       
+    // call local kernel function
+    vfs_dentry_destroy( dentry );
+
+#if DEBUG_RPC_VFS_DENTRY_DESTROY
+cycle = (uint32_t)hal_get_cycles();
+if( cycle > DEBUG_RPC_VFS_DENTRY_DESTROY )
+printk("\n[%s] thread[%x,%x] on core %d exit / cycle %d\n",
+__FUNCTION__, this->process->pid, this->trdid, this->core->lid, cycle );
+#endif
+}
+
+
+/////////////////////////////////////////////////////////////////////////////////////////
+// [14]  RPC_VFS_FILE_CREATE  deprecated [AG] dec 2019
+/////////////////////////////////////////////////////////////////////////////////////////
+void rpc_vfs_file_create_client( cxy_t                  cxy,
+                                 struct vfs_inode_s   * inode,       // in
+                                 uint32_t               file_attr,   // in
+                                 xptr_t               * file_xp,     // out
+                                 error_t              * error )      // out
+{
+#if DEBUG_RPC_VFS_FILE_CREATE
+thread_t * this = CURRENT_THREAD;
+uint32_t cycle = (uint32_t)hal_get_cycles();
+if( cycle > DEBUG_RPC_VFS_FILE_CREATE )
+printk("\n[%s] thread[%x,%x] on core %d enter / cycle %d\n",
+__FUNCTION__, this->process->pid, this->trdid, this->core->lid , cycle );
+#endif
+
+    uint32_t responses = 1;
+
+    // initialise RPC descriptor header 
+    rpc_desc_t  rpc;
+    rpc.index    = RPC_VFS_FILE_CREATE;
+    rpc.blocking = true;
+    rpc.rsp      = &responses;
+
+    // set input arguments in RPC descriptor 
+    rpc.args[0] = (uint64_t)(intptr_t)inode;
+    rpc.args[1] = (uint64_t)file_attr;
+
+    // register RPC request in remote RPC fifo
+    rpc_send( cxy , &rpc );
+
+    // get output values from RPC descriptor
+    *file_xp = (xptr_t)rpc.args[2];
+    *error   = (error_t)rpc.args[3];
+
+#if DEBUG_RPC_VFS_FILE_CREATE
+cycle = (uint32_t)hal_get_cycles();
+if( cycle > DEBUG_RPC_VFS_FILE_CREATE )
+printk("\n[%s] thread[%x,%x] on core %d exit / cycle %d\n",
+__FUNCTION__, this->process->pid, this->trdid, this->core->lid, cycle );
+#endif
+}
+
+////////////////////////////////////////////
+void rpc_vfs_file_create_server( xptr_t xp )
+{
+#if DEBUG_RPC_VFS_FILE_CREATE
+thread_t * this = CURRENT_THREAD;
+uint32_t cycle = (uint32_t)hal_get_cycles();
+if( cycle > DEBUG_RPC_VFS_FILE_CREATE )
+printk("\n[%s] thread[%x,%x] on core %d enter / cycle %d\n",
+__FUNCTION__, this->process->pid, this->trdid, this->core->lid , cycle );
+#endif
+
+    uint32_t      file_attr;
+    vfs_inode_t * inode;
+    xptr_t        file_xp;
+    error_t       error;
+
+    // get client cluster identifier and pointer on RPC descriptor
+    cxy_t        client_cxy  = GET_CXY( xp );
+    rpc_desc_t * desc        = GET_PTR( xp );
+
+    // get arguments "file_attr" and "inode" from client RPC descriptor
+    inode     = (vfs_inode_t *)(intptr_t)hal_remote_l64( XPTR( client_cxy , &desc->args[0] ) );
+    file_attr = (uint32_t)               hal_remote_l64( XPTR( client_cxy , &desc->args[1] ) );
+                       
+    // call local kernel function
+    error = vfs_file_create( inode,
+                             file_attr,
+                             &file_xp );
+ 
+    // set output arguments
+    hal_remote_s64( XPTR( client_cxy , &desc->args[2] ) , (uint64_t)file_xp );
+    hal_remote_s64( XPTR( client_cxy , &desc->args[3] ) , (uint64_t)error );
+
+#if DEBUG_RPC_VFS_FILE_CREATE
+cycle = (uint32_t)hal_get_cycles();
+if( cycle > DEBUG_RPC_VFS_FILE_CREATE )
+printk("\n[%s] thread[%x,%x] on core %d exit / cycle %d\n",
+__FUNCTION__, this->process->pid, this->trdid, this->core->lid, cycle );
+#endif
+}
+
+/////////////////////////////////////////////////////////////////////////////////////////
+// [15]  RPC_VFS_FILE_DESTROY    deprecated [AG] dec 2019
+/////////////////////////////////////////////////////////////////////////////////////////
+void rpc_vfs_file_destroy_client( cxy_t        cxy,
+                                  vfs_file_t * file )
+{
+#if DEBUG_RPC_VFS_FILE_DESTROY
+thread_t * this = CURRENT_THREAD;
+uint32_t cycle = (uint32_t)hal_get_cycles();
+if( cycle > DEBUG_RPC_VFS_FILE_DESTROY )
+printk("\n[%s] thread[%x,%x] on core %d enter / cycle %d\n",
+__FUNCTION__, this->process->pid, this->trdid, this->core->lid , cycle );
+#endif
+
+    uint32_t responses = 1;
+
+    // initialise RPC descriptor header 
+    rpc_desc_t  rpc;
+    rpc.index    = RPC_VFS_FILE_DESTROY;
+    rpc.blocking = true;
+    rpc.rsp      = &responses;
+
+    // set input arguments in RPC descriptor 
+    rpc.args[0] = (uint64_t)(intptr_t)file;
+    
+    // register RPC request in remote RPC fifo
+    rpc_send( cxy , &rpc );
+
+#if DEBUG_RPC_VFS_FILE_DESTROY
+cycle = (uint32_t)hal_get_cycles();
+if( cycle > DEBUG_RPC_VFS_FILE_DESTROY )
+printk("\n[%s] thread[%x,%x] on core %d exit / cycle %d\n",
+__FUNCTION__, this->process->pid, this->trdid, this->core->lid, cycle );
+#endif
+}
+
+/////////////////////////////////////////////
+void rpc_vfs_file_destroy_server( xptr_t xp )
+{
+#if DEBUG_RPC_VFS_FILE_DESTROY
+thread_t * this = CURRENT_THREAD;
+uint32_t cycle = (uint32_t)hal_get_cycles();
+if( cycle > DEBUG_RPC_VFS_FILE_DESTROY )
+printk("\n[%s] thread[%x,%x] on core %d enter / cycle %d\n",
+__FUNCTION__, this->process->pid, this->trdid, this->core->lid , cycle );
+#endif
+
+    vfs_file_t * file;
+
+    // get client cluster identifier and pointer on RPC descriptor
+    cxy_t        client_cxy  = GET_CXY( xp );
+    rpc_desc_t * desc        = GET_PTR( xp );
+
+    // get arguments "dentry" from client RPC descriptor
+    file = (vfs_file_t *)(intptr_t)hal_remote_l64( XPTR( client_cxy , &desc->args[0] ) );
+                       
+    // call local kernel function
+    vfs_file_destroy( file );
+
+#if DEBUG_RPC_VFS_FILE_DESTROY
+cycle = (uint32_t)hal_get_cycles();
+if( cycle > DEBUG_RPC_VFS_FILE_DESTROY )
+printk("\n[%s] thread[%x,%x] on core %d exit / cycle %d\n",
+__FUNCTION__, this->process->pid, this->trdid, this->core->lid, cycle );
+#endif
+}
+
+/////////////////////////////////////////////////////////////////////////////////////////
+// [16]  RPC_VFS_FS_GET_DENTRY   deprecated [AG] dec 2019
+/////////////////////////////////////////////////////////////////////////////////////////
+void rpc_vfs_fs_new_dentry_client( cxy_t         cxy,
+                                   vfs_inode_t * parent_inode,    // in
+                                   char        * name,            // in
+                                   xptr_t        child_inode_xp,  // in
+                                   error_t     * error )          // out
+{
+#if DEBUG_RPC_VFS_FS_NEW_DENTRY
+thread_t * this = CURRENT_THREAD;
+uint32_t cycle = (uint32_t)hal_get_cycles();
+if( cycle > DEBUG_RPC_VFS_FS_NEW_DENTRY )
+printk("\n[%s] thread[%x,%x] on core %d enter / cycle %d\n",
+__FUNCTION__, this->process->pid, this->trdid, this->core->lid , cycle );
+#endif
+
+    uint32_t responses = 1;
+
+    // initialise RPC descriptor header 
+    rpc_desc_t  rpc;
+    rpc.index    = RPC_VFS_FS_NEW_DENTRY;
+    rpc.blocking = true;
+    rpc.rsp      = &responses;
+
+    // set input arguments in RPC descriptor 
+    rpc.args[0] = (uint64_t)(intptr_t)parent_inode;
+    rpc.args[1] = (uint64_t)(intptr_t)name;
+    rpc.args[2] = (uint64_t)child_inode_xp;
+
+    // register RPC request in remote RPC fifo
+    rpc_send( cxy , &rpc );
+
+    // get output values from RPC descriptor
+    *error   = (error_t)rpc.args[3];
+
+#if DEBUG_RPC_VFS_FS_NEW_DENTRY
+cycle = (uint32_t)hal_get_cycles();
+if( cycle > DEBUG_RPC_VFS_FS_NEW_DENTRY )
+printk("\n[%s] thread[%x,%x] on core %d exit / cycle %d\n",
+__FUNCTION__, this->process->pid, this->trdid, this->core->lid , cycle );
+#endif
+}
+
+//////////////////////////////////////////////
+void rpc_vfs_fs_new_dentry_server( xptr_t xp )
+{
+#if DEBUG_RPC_VFS_FS_NEW_DENTRY
+thread_t * this = CURRENT_THREAD;
+uint32_t cycle = (uint32_t)hal_get_cycles();
+if( cycle > DEBUG_RPC_VFS_FS_NEW_DENTRY )
+printk("\n[%s] thread[%x,%x] on core %d enter / cycle %d\n",
+__FUNCTION__, this->process->pid, this->trdid, this->core->lid , cycle );
+#endif
+
+    error_t       error;
+    vfs_inode_t * parent;
+    xptr_t        child_xp;
+    char        * name;
+
+    char          name_copy[CONFIG_VFS_MAX_NAME_LENGTH];
+
+    // get client cluster identifier and pointer on RPC descriptor
+    cxy_t        client_cxy  = GET_CXY( xp );
+    rpc_desc_t * desc        = GET_PTR( xp );
+
+    // get arguments "parent", "name", and "child_xp"
+    parent     = (vfs_inode_t*)(intptr_t)hal_remote_l64(XPTR(client_cxy , &desc->args[0]));
+    name       = (char*)(intptr_t)       hal_remote_l64(XPTR(client_cxy , &desc->args[1]));
+    child_xp   = (xptr_t)                hal_remote_l64(XPTR(client_cxy , &desc->args[2]));
+
+    // get name local copy
+    hal_remote_strcpy( XPTR( local_cxy , name_copy ) ,
+                       XPTR( client_cxy , name ) );
+
+    // call the kernel function
+    error = vfs_fs_new_dentry( parent , name_copy , child_xp );
+
+    // set output argument
+    hal_remote_s64( XPTR( client_cxy , &desc->args[3] ) , (uint64_t)error );
+
+#if DEBUG_RPC_VFS_FS_NEW_DENTRY
+cycle = (uint32_t)hal_get_cycles();
+if( cycle > DEBUG_RPC_VFS_FS_NEW_DENTRY )
+printk("\n[%s] thread[%x,%x] on core %d exit / cycle %d\n",
+__FUNCTION__, this->process->pid, this->trdid, this->core->lid , cycle );
+#endif
+}
+
+/////////////////////////////////////////////////////////////////////////////////////////
+// [17]  RPC_VFS_FS_ADD_DENTRY  deprecated [AG] dec 2019
+/////////////////////////////////////////////////////////////////////////////////////////
+void rpc_vfs_fs_add_dentry_client( cxy_t          cxy,
+                                   vfs_inode_t  * parent,     // in
+                                   vfs_dentry_t * dentry,     // in
+                                   error_t      * error )     // out
+{
+#if DEBUG_RPC_VFS_FS_ADD_DENTRY
+thread_t * this = CURRENT_THREAD;
+uint32_t cycle = (uint32_t)hal_get_cycles();
+if( cycle > DEBUG_RPC_VFS_FS_ADD_DENTRY )
+printk("\n[%s] thread[%x,%x] on core %d enter / cycle %d\n",
+__FUNCTION__, this->process->pid, this->trdid, this->core->lid , cycle );
+#endif
+
+    uint32_t responses = 1;
+
+    // initialise RPC descriptor header 
+    rpc_desc_t  rpc;
+    rpc.index    = RPC_VFS_FS_ADD_DENTRY;
+    rpc.blocking = true;
+    rpc.rsp      = &responses;
+
+    // set input arguments in RPC descriptor 
+    rpc.args[0] = (uint64_t)(intptr_t)parent;
+    rpc.args[1] = (uint64_t)(intptr_t)dentry;
+
+    // register RPC request in remote RPC fifo
+    rpc_send( cxy , &rpc );
+
+    // get output values from RPC descriptor
+    *error   = (error_t)rpc.args[2];
+
+#if DEBUG_RPC_VFS_FS_ADD_DENTRY
+cycle = (uint32_t)hal_get_cycles();
+if( cycle > DEBUG_RPC_VFS_FS_ADD_DENTRY )
+printk("\n[%s] thread[%x,%x] on core %d exit / cycle %d\n",
+__FUNCTION__, this->process->pid, this->trdid, this->core->lid , cycle );
+#endif
+}
+
+//////////////////////////////////////////////
+void rpc_vfs_fs_add_dentry_server( xptr_t xp )
+{
+#if DEBUG_RPC_VFS_FS_ADD_DENTRY
+thread_t * this = CURRENT_THREAD;
+uint32_t cycle = (uint32_t)hal_get_cycles();
+if( cycle > DEBUG_RPC_VFS_FS_ADD_DENTRY )
+printk("\n[%s] thread[%x,%x] on core %d enter / cycle %d\n",
+__FUNCTION__, this->process->pid, this->trdid, this->core->lid , cycle );
+#endif
+
+    error_t        error;
+    vfs_inode_t  * parent;
+    vfs_dentry_t * dentry;
+
+    // get client cluster identifier and pointer on RPC descriptor
+    cxy_t        client_cxy  = GET_CXY( xp );
+    rpc_desc_t * desc        = GET_PTR( xp );
+
+    // get input arguments
+    parent = (vfs_inode_t*)(intptr_t) hal_remote_l64(XPTR(client_cxy , &desc->args[0]));
+    dentry = (vfs_dentry_t*)(intptr_t)hal_remote_l64(XPTR(client_cxy , &desc->args[1]));
+
+    // call the kernel function
+    error = vfs_fs_add_dentry( parent , dentry );
+
+    // set output argument
+    hal_remote_s64( XPTR( client_cxy , &desc->args[2] ) , (uint64_t)error );
+
+#if DEBUG_RPC_VFS_FS_ADD_DENTRY
+cycle = (uint32_t)hal_get_cycles();
+if( cycle > DEBUG_RPC_VFS_FS_ADD_DENTRY )
+printk("\n[%s] thread[%x,%x] on core %d exit / cycle %d\n",
+__FUNCTION__, this->process->pid, this->trdid, this->core->lid , cycle );
+#endif
+}
+
+/////////////////////////////////////////////////////////////////////////////////////////
+// [18]   RPC_VFS_FS_REMOVE_DENTRY    deprecated [AG] dec 2019
+/////////////////////////////////////////////////////////////////////////////////////////
+void rpc_vfs_fs_remove_dentry_client( cxy_t          cxy,
+                                      vfs_inode_t  * parent,     // in
+                                      vfs_dentry_t * dentry,     // in
+                                      error_t      * error )     // out
+{
+#if DEBUG_RPC_VFS_FS_REMOVE_DENTRY
+thread_t * this = CURRENT_THREAD;
+uint32_t cycle = (uint32_t)hal_get_cycles();
+if( cycle > DEBUG_RPC_VFS_FS_REMOVE_DENTRY )
+printk("\n[%s] thread[%x,%x] on core %d enter / cycle %d\n",
+__FUNCTION__, this->process->pid, this->trdid, this->core->lid , cycle );
+#endif
+
+    uint32_t responses = 1;
+
+    // initialise RPC descriptor header 
+    rpc_desc_t  rpc;
+    rpc.index    = RPC_VFS_FS_REMOVE_DENTRY;
+    rpc.blocking = true;
+    rpc.rsp      = &responses;
+
+    // set input arguments in RPC descriptor 
+    rpc.args[0] = (uint64_t)(intptr_t)parent;
+    rpc.args[1] = (uint64_t)(intptr_t)dentry;
+
+    // register RPC request in remote RPC fifo
+    rpc_send( cxy , &rpc );
+
+    // get output values from RPC descriptor
+    *error   = (error_t)rpc.args[2];
+
+#if DEBUG_RPC_VFS_FS_REMOVE_DENTRY
+cycle = (uint32_t)hal_get_cycles();
+if( cycle > DEBUG_RPC_VFS_FS_REMOVE_DENTRY )
+printk("\n[%s] thread[%x,%x] on core %d exit / cycle %d\n",
+__FUNCTION__, this->process->pid, this->trdid, this->core->lid , cycle );
+#endif
+}
+
+/////////////////////////////////////////////////
+void rpc_vfs_fs_remove_dentry_server( xptr_t xp )
+{
+#if DEBUG_RPC_VFS_FS_REMOVE_DENTRY
+thread_t * this = CURRENT_THREAD;
+uint32_t cycle = (uint32_t)hal_get_cycles();
+if( cycle > DEBUG_RPC_VFS_FS_REMOVE_DENTRY )
+printk("\n[%s] thread[%x,%x] on core %d enter / cycle %d\n",
+__FUNCTION__, this->process->pid, this->trdid, this->core->lid , cycle );
+#endif
+
+    error_t        error;
+    vfs_inode_t  * parent;
+    vfs_dentry_t * dentry;
+
+    // get client cluster identifier and pointer on RPC descriptor
+    cxy_t        client_cxy  = GET_CXY( xp );
+    rpc_desc_t * desc        = GET_PTR( xp );
+
+    // get input arguments
+    parent = (vfs_inode_t*)(intptr_t) hal_remote_l64(XPTR(client_cxy , &desc->args[0]));
+    dentry = (vfs_dentry_t*)(intptr_t)hal_remote_l64(XPTR(client_cxy , &desc->args[1]));
+
+    // call the kernel function
+    error = vfs_fs_remove_dentry( parent , dentry );
+
+    // set output argument
+    hal_remote_s64( XPTR( client_cxy , &desc->args[2] ) , (uint64_t)error );
+
+#if DEBUG_RPC_VFS_FS_REMOVE_DENTRY
+cycle = (uint32_t)hal_get_cycles();
+if( cycle > DEBUG_RPC_VFS_FS_REMOVE_DENTRY )
+printk("\n[%s] thread[%x,%x] on core %d exit / cycle %d\n",
+__FUNCTION__, this->process->pid, this->trdid, this->core->lid , cycle );
+#endif
+}
+
+/////////////////////////////////////////////////////////////////////////////////////////
+// [19]   RPC_VFS_INODE_LOAD_ALL_PAGES deprecated [AG] dec 2019
+/////////////////////////////////////////////////////////////////////////////////////////
+void rpc_vfs_inode_load_all_pages_client( cxy_t         cxy,
+                                          vfs_inode_t * inode,      // in
+                                          error_t     * error )     // out
+{
+#if DEBUG_RPC_VFS_INODE_LOAD_ALL_PAGES
+thread_t * this = CURRENT_THREAD;
+uint32_t cycle = (uint32_t)hal_get_cycles();
+if( cycle > DEBUG_RPC_VFS_INODE_LOAD_ALL_PAGES )
+printk("\n[%s] thread[%x,%x] on core %d enter / cycle %d\n",
+__FUNCTION__, this->process->pid, this->trdid, this->core->lid , cycle );
+#endif
+
+    uint32_t responses = 1;
+
+    // initialise RPC descriptor header 
+    rpc_desc_t  rpc;
+    rpc.index    = RPC_VFS_INODE_LOAD_ALL_PAGES;
+    rpc.blocking = true;
+    rpc.rsp      = &responses;
+
+    // set input arguments in RPC descriptor 
+    rpc.args[0] = (uint64_t)(intptr_t)inode;
+
+    // register RPC request in remote RPC fifo
+    rpc_send( cxy , &rpc );
+
+    // get output values from RPC descriptor
+    *error   = (error_t)rpc.args[1];
+
+#if DEBUG_RPC_VFS_INODE_LOAD_ALL_PAGES
+cycle = (uint32_t)hal_get_cycles();
+if( cycle > DEBUG_RPC_VFS_INODE_LOAD_ALL_PAGES )
+printk("\n[%s] thread[%x,%x] on core %d exit / cycle %d\n",
+__FUNCTION__, this->process->pid, this->trdid, this->core->lid , cycle );
+#endif
+}
+
+/////////////////////////////////////////////////////
+void rpc_vfs_inode_load_all_pages_server( xptr_t xp )
+{
+#if DEBUG_RPC_VFS_INODE_LOAD_ALL_PAGES
+thread_t * this = CURRENT_THREAD;
+uint32_t cycle = (uint32_t)hal_get_cycles();
+if( cycle > DEBUG_RPC_VFS_INODE_LOAD_ALL_PAGES )
+printk("\n[%s] thread[%x,%x] on core %d enter / cycle %d\n",
+__FUNCTION__, this->process->pid, this->trdid, this->core->lid , cycle );
+#endif
+
+    error_t       error;
+    vfs_inode_t * inode;
+
+    // get client cluster identifier and pointer on RPC descriptor
+    cxy_t        client_cxy  = GET_CXY( xp );
+    rpc_desc_t * desc        = GET_PTR( xp );
+
+    // get input argument
+    inode = (vfs_inode_t*)(intptr_t)hal_remote_l64(XPTR(client_cxy , &desc->args[0]));
+
+    // call the kernel function
+    error = vfs_inode_load_all_pages( inode );
+
+    // set output argument
+    hal_remote_s64( XPTR( client_cxy , &desc->args[1] ) , (uint64_t)error );
+
+#if DEBUG_RPC_VFS_INODE_LOAD_ALL_PAGES
+cycle = (uint32_t)hal_get_cycles();
+if( cycle > DEBUG_RPC_VFS_INODE_LOAD_ALL_PAGES )
+printk("\n[%s] thread[%x,%x] on core %d exit / cycle %d\n",
+__FUNCTION__, this->process->pid, this->trdid, this->core->lid , cycle );
+#endif
+}
+
+/////////////////////////////////////////////////////////////////////////////////////////
+// [20]  RPC_VMM_GET_VSEG deprecated [AG] sept 2019
+/////////////////////////////////////////////////////////////////////////////////////////
+void rpc_vmm_get_vseg_client( cxy_t       cxy,      
+                              process_t * process,     // in  
+                              intptr_t    vaddr,       // in  
+                              xptr_t    * vseg_xp,     // out
+                              error_t   * error )      // out
+{
+#if DEBUG_RPC_VMM_GET_VSEG
+thread_t * this = CURRENT_THREAD;
+uint32_t cycle = (uint32_t)hal_get_cycles();
+if( cycle > DEBUG_RPC_VMM_GET_VSEG )
+printk("\n[%s] thread[%x,%x] on core %d enter / cycle %d\n",
+__FUNCTION__, this->process->pid, this->trdid, this->core->lid , cycle );
+#endif
+
+    uint32_t responses = 1;
+
+    // initialise RPC descriptor header 
+    rpc_desc_t  rpc;
+    rpc.index    = RPC_VMM_GET_VSEG;
+    rpc.blocking = true;
+    rpc.rsp      = &responses;
+
+    // set input arguments in RPC descriptor 
+    rpc.args[0] = (uint64_t)(intptr_t)process;
+    rpc.args[1] = (uint64_t)vaddr;
+
+    // register RPC request in remote RPC fifo
+    rpc_send( cxy , &rpc );
+
+    // get output argument from rpc descriptor
+    *vseg_xp = rpc.args[2];
+    *error   = (error_t)rpc.args[3];
+
+#if DEBUG_RPC_VMM_GET_VSEG
+cycle = (uint32_t)hal_get_cycles();
+if( cycle > DEBUG_RPC_VMM_GET_VSEG )
+printk("\n[%s] thread[%x,%x] on core %d exit / cycle %d\n",
+__FUNCTION__, this->process->pid, this->trdid, this->core->lid , cycle );
+#endif
+}
+
+/////////////////////////////////////////
+void rpc_vmm_get_vseg_server( xptr_t xp )
+{
+#if DEBUG_RPC_VMM_GET_VSEG
+thread_t * this = CURRENT_THREAD;
+uint32_t cycle = (uint32_t)hal_get_cycles();
+if( cycle > DEBUG_RPC_VMM_GET_VSEG )
+printk("\n[%s] thread[%x,%x] on core %d enter / cycle %d\n",
+__FUNCTION__, this->process->pid, this->trdid, this->core->lid , cycle );
+#endif
+
+    process_t   * process;
+    intptr_t      vaddr;
+    vseg_t      * vseg_ptr;
+    xptr_t        vseg_xp;
+    error_t       error;
+
+    // get client cluster identifier and pointer on RPC descriptor
+    cxy_t        client_cxy  = GET_CXY( xp );
+    rpc_desc_t * desc        = GET_PTR( xp );
+
+    // get input argument from client RPC descriptor
+    process = (process_t *)(intptr_t)hal_remote_l64( XPTR( client_cxy , &desc->args[0] ) );
+    vaddr   = (intptr_t)hal_remote_l64( XPTR( client_cxy , &desc->args[1] ) );
+    
+    // call local kernel function
+    error = vmm_get_vseg( process , vaddr , &vseg_ptr );
+
+    // set output arguments to client RPC descriptor
+    vseg_xp = XPTR( local_cxy , vseg_ptr );
+    hal_remote_s64( XPTR( client_cxy , &desc->args[2] ) , (uint64_t)vseg_xp );
+    hal_remote_s64( XPTR( client_cxy , &desc->args[3] ) , (uint64_t)error );
+
+#if DEBUG_RPC_VMM_GET_VSEG
+cycle = (uint32_t)hal_get_cycles();
+if( cycle > DEBUG_RPC_VMM_GET_VSEG )
+printk("\n[%s] thread[%x,%x] on core %d exit / cycle %d\n",
+__FUNCTION__, this->process->pid, this->trdid, this->core->lid , cycle );
+#endif
+}
+
+/////////////////////////////////////////////////////////////////////////////////////////
+// [22]          RPC_KCM_ALLOC deprecated [AG] sept 2019
+/////////////////////////////////////////////////////////////////////////////////////////
+void rpc_kcm_alloc_client( cxy_t      cxy,
+                           uint32_t   kmem_type,   // in
+                           xptr_t   * buf_xp )     // out
+{
+#if DEBUG_RPC_KCM_ALLOC
+thread_t * this = CURRENT_THREAD;
+uint32_t cycle = (uint32_t)hal_get_cycles();
+if( cycle > DEBUG_RPC_KCM_ALLOC )
+printk("\n[%s] thread[%x,%x] on core %d enter / cycle %d\n",
+__FUNCTION__, this->process->pid, this->trdid, this->core->lid , cycle );
+#endif
+
+    uint32_t responses = 1;
+
+    // initialise RPC descriptor header 
+    rpc_desc_t  rpc;
+    rpc.index    = RPC_KCM_ALLOC;
+    rpc.blocking = true;
+    rpc.rsp      = &responses;
+
+    // set input arguments in RPC descriptor 
+    rpc.args[0] = (uint64_t)kmem_type;
+
+    // register RPC request in remote RPC fifo
+    rpc_send( cxy , &rpc );
+
+    // get output arguments from RPC descriptor
+    *buf_xp = (xptr_t)rpc.args[1];
+
+#if DEBUG_RPC_KCM_ALLOC
+cycle = (uint32_t)hal_get_cycles();
+if( cycle > DEBUG_RPC_KCM_ALLOC )
+printk("\n[%s] thread[%x,%x] on core %d exit / cycle %d\n",
+__FUNCTION__, this->process->pid, this->trdid, this->core->lid , cycle );
+#endif
+}
+
+//////////////////////////////////////
+void rpc_kcm_alloc_server( xptr_t xp )
+{
+#if DEBUG_RPC_KCM_ALLOC
+thread_t * this = CURRENT_THREAD;
+uint32_t cycle = (uint32_t)hal_get_cycles();
+if( cycle > DEBUG_RPC_KCM_ALLOC )
+printk("\n[%s] thread[%x,%x] on core %d enter / cycle %d\n",
+__FUNCTION__, this->process->pid, this->trdid, this->core->lid , cycle );
+#endif
+
+    // get client cluster identifier and pointer on RPC descriptor
+    cxy_t        client_cxy  = GET_CXY( xp );
+    rpc_desc_t * desc        = GET_PTR( xp );
+
+    // get input argument "kmem_type" from client RPC descriptor
+    uint32_t kmem_type = (uint32_t)hal_remote_l64( XPTR( client_cxy , &desc->args[0] ) );
+
+    // allocates memory for kcm
+    kmem_req_t  req;
+    req.type  = kmem_type;
+    req.flags = AF_ZERO;
+    void * buf_ptr = kmem_alloc( &req );
+
+    // set output argument
+    xptr_t buf_xp = XPTR( local_cxy , buf_ptr );
+    hal_remote_s64( XPTR( client_cxy , &desc->args[1] ) , (uint64_t)buf_xp );
+
+#if DEBUG_RPC_KCM_ALLOC
+cycle = (uint32_t)hal_get_cycles();
+if( cycle > DEBUG_RPC_KCM_ALLOC )
+printk("\n[%s] thread[%x,%x] on core %d exit / cycle %d\n",
+__FUNCTION__, this->process->pid, this->trdid, this->core->lid , cycle );
+#endif
+}   
+
+/////////////////////////////////////////////////////////////////////////////////////////
+// [23]          RPC_KCM_FREE deprecated [AG] sept 2019
+/////////////////////////////////////////////////////////////////////////////////////////
+void rpc_kcm_free_client( cxy_t      cxy,
+                          void     * buf,          // in
+                          uint32_t   kmem_type )   // in
+{
+#if DEBUG_RPC_KCM_FREE
+thread_t * this = CURRENT_THREAD;
+uint32_t cycle = (uint32_t)hal_get_cycles();
+if( cycle > DEBUG_RPC_KCM_FREE )
+printk("\n[%s] thread[%x,%x] on core %d enter / cycle %d\n",
+__FUNCTION__, this->process->pid, this->trdid, this->core->lid , cycle );
+#endif
+
+    uint32_t responses = 1;
+
+    // initialise RPC descriptor header 
+    rpc_desc_t  rpc;
+    rpc.index    = RPC_KCM_FREE;
+    rpc.blocking = true;
+    rpc.rsp      = &responses;
+
+    // set input arguments in RPC descriptor 
+    rpc.args[0] = (uint64_t)(intptr_t)buf;
+    rpc.args[1] = (uint64_t)kmem_type;
+
+    // register RPC request in remote RPC fifo
+    rpc_send( cxy , &rpc );
+
+#if DEBUG_RPC_KCM_FREE
+cycle = (uint32_t)hal_get_cycles();
+if( cycle > DEBUG_RPC_KCM_FREE )
+printk("\n[%s] thread[%x,%x] on core %d exit / cycle %d\n",
+__FUNCTION__, this->process->pid, this->trdid, this->core->lid , cycle );
+#endif
+}
+
+/////////////////////////////////////
+void rpc_kcm_free_server( xptr_t xp )
+{
+#if DEBUG_RPC_KCM_FREE
+thread_t * this = CURRENT_THREAD;
+uint32_t cycle = (uint32_t)hal_get_cycles();
+if( cycle > DEBUG_RPC_KCM_FREE )
+printk("\n[%s] thread[%x,%x] on core %d enter / cycle %d\n",
+__FUNCTION__, this->process->pid, this->trdid, this->core->lid , cycle );
+#endif
+
+    // get client cluster identifier and pointer on RPC descriptor
+    cxy_t        client_cxy  = GET_CXY( xp );
+    rpc_desc_t * desc        = GET_PTR( xp );
+
+    // get input arguments "buf" and "kmem_type" from client RPC descriptor
+    void     * buf = (void *)(intptr_t)hal_remote_l64( XPTR( client_cxy , &desc->args[0] ) );
+    uint32_t   kmem_type = (uint32_t)hal_remote_l64( XPTR( client_cxy , &desc->args[1] ) );
+
+    // releases memory
+    kmem_req_t  req;
+    req.type = kmem_type;
+    req.ptr  = buf;
+    kmem_free( &req );
+
+#if DEBUG_RPC_KCM_FREE
+cycle = (uint32_t)hal_get_cycles();
+if( cycle > DEBUG_RPC_KCM_FREE )
+printk("\n[%s] thread[%x,%x] on core %d exit / cycle %d\n",
+__FUNCTION__, this->process->pid, this->trdid, this->core->lid , cycle );
+#endif
+}   
+
+/////////////////////////////////////////////////////////////////////////////////////////
+// [24]          Marshaling functions attached to RPC_MAPPER_SYNC 
+/////////////////////////////////////////////////////////////////////////////////////////
+void rpc_mapper_sync_client( cxy_t             cxy,
+                             struct mapper_s * mapper,
+                             error_t         * error )
+{
+#if DEBUG_RPC_MAPPER_SYNC
+thread_t * this = CURRENT_THREAD;
+uint32_t cycle = (uint32_t)hal_get_cycles();
+if( cycle > DEBUG_RPC_MAPPER_SYNC )
+printk("\n[%s] thread[%x,%x] on core %d enter / cycle %d\n",
+__FUNCTION__, this->process->pid, this->trdid, this->core->lid , cycle );
+#endif
+
+    uint32_t responses = 1;
+
+    // initialise RPC descriptor header 
+    rpc_desc_t  rpc;
+    rpc.index    = RPC_MAPPER_SYNC;
+    rpc.blocking = true;
+    rpc.rsp      = &responses;
+
+    // set input arguments in RPC descriptor 
+    rpc.args[0] = (uint64_t)(intptr_t)mapper;
+
+    // register RPC request in remote RPC fifo
+    rpc_send( cxy , &rpc );
+
+    // get output values from RPC descriptor
+    *error   = (error_t)rpc.args[1];
+
+#if DEBUG_RPC_MAPPER_SYNC
+cycle = (uint32_t)hal_get_cycles();
+if( cycle > DEBUG_RPC_MAPPER_SYNC )
+printk("\n[%s] thread[%x,%x] on core %d exit / cycle %d\n",
+__FUNCTION__, this->process->pid, this->trdid, this->core->lid , cycle );
+#endif
+}
+
+////////////////////////////////////////
+void rpc_mapper_sync_server( xptr_t xp )
+{
+#if DEBUG_RPC_MAPPER_SYNC
+thread_t * this = CURRENT_THREAD;
+uint32_t cycle = (uint32_t)hal_get_cycles();
+if( cycle > DEBUG_RPC_MAPPER_SYNC )
+printk("\n[%s] thread[%x,%x] on core %d enter / cycle %d\n",
+__FUNCTION__, this->process->pid, this->trdid, this->core->lid , cycle );
+#endif
+
+    mapper_t * mapper;
+    error_t    error;
+
+    // get client cluster identifier and pointer on RPC descriptor
+    cxy_t        client_cxy  = GET_CXY( xp );
+    rpc_desc_t * desc        = GET_PTR( xp );
+
+    // get arguments from client RPC descriptor
+    mapper  = (mapper_t *)(intptr_t)hal_remote_l64( XPTR( client_cxy , &desc->args[0] ) );
+
+    // call local kernel function
+    error = mapper_sync( mapper );
+
+    // set output argument to client RPC descriptor
+    hal_remote_s64( XPTR( client_cxy , &desc->args[1] ) , (uint64_t)error );
+
+#if DEBUG_RPC_MAPPER_SYNC
+cycle = (uint32_t)hal_get_cycles();
+if( cycle > DEBUG_RPC_MAPPER_SYNC )
+printk("\n[%s] thread[%x,%x] on core %d exit / cycle %d\n",
+__FUNCTION__, this->process->pid, this->trdid, this->core->lid , cycle );
+#endif
+}
+
 */
+
+
+
+/*
+////////////////////////////////////////////////////
+void rpc_fbf_display_client( cxy_t        cxy,
+                             xptr_t       window_xp,
+                             uint32_t     cores,
+                             error_t    * error )
+{
+#if DEBUG_RPC_FBF_DISPLAY
+uint32_t  cycle = (uint32_t)hal_get_cycles();
+thread_t * this = CURRENT_THREAD;
+if( DEBUG_RPC_FBF_DISPLAY < cycle )
+printk("\n[%s] thread[%x,%x] on core %d : enter / cycle %d\n",
+__FUNCTION__, this->process->pid, this->trdid, this->core->lid, cycle );
+#endif
+
+    uint32_t    responses = 1;
+    rpc_desc_t  rpc;
+
+    // initialise RPC descriptor header 
+    rpc.index    = RPC_FBF_DISPLAY;
+    rpc.blocking = true;
+    rpc.rsp      = &responses;
+
+    // set input arguments in RPC descriptor 
+    rpc.args[0] = (uint64_t)window_xp;
+    rpc.args[1] = (uint64_t)cores;
+
+    // register RPC request in remote RPC fifo 
+    rpc_send( cxy , &rpc );
+
+    // get output argument from RPC descriptor
+    *error     = (error_t)rpc.args[2];
+
+#if DEBUG_RPC_FBF_DISPLAY
+cycle = (uint32_t)hal_get_cycles();
+if( DEBUG_RPC_FBF_DISPLAY < cycle )
+printk("\n[%s] thread[%x,%x] on core %d : exit / cycle %d\n",
+__FUNCTION__, this->process->pid, this->trdid, this->core->lid, cycle );
+#endif
+}
+
+////////////////////////////////////////
+void rpc_fbf_display_server( xptr_t xp )
+{
+    // get client cluster identifier and pointer on RPC descriptor
+    cxy_t        client_cxy = GET_CXY( xp );
+    rpc_desc_t * desc       = GET_PTR( xp );
+
+    // get arguments from RPC descriptor
+    xptr_t   window_xp = (xptr_t  )hal_remote_l64( XPTR(client_cxy , &desc->args[0]) );
+    uint32_t ncores    = (uint32_t)hal_remote_l64( XPTR(client_cxy , &desc->args[1]) );
+
+#if DEBUG_RPC_FBF_DISPLAY
+uint32_t cycle = (uint32_t)hal_get_cycles();
+thread_t * this = CURRENT_THREAD;
+if( DEBUG_RPC_FBF_DISPLAY < cycle )
+printk("\n[%s] thread[%x,%x] on core %d : enter / cycle %d\n",
+__FUNCTION__, this->process->pid, this->trdid, this->core->lid, cycle );
+#endif
+
+    // call relevant kernel function 
+    error_t error = dev_fbf_parallel_display( window_xp , ncores );
+
+    // WARNING : for parallel RPCs, the return error argument is shared
+    hal_remote_atomic_or( XPTR( client_cxy , &desc->args[2] ) , error );
+
+#if DEBUG_RPC_FBF_DISPLAY
+cycle = (uint32_t)hal_get_cycles();
+if( DEBUG_RPC_FBF_DISPLAY < cycle )
+printk("\n[%s] thread[%x,%x] on core %d : exit / cycle %d\n",
+__FUNCTION__, this->process->pid, this->trdid, this->core->lid, cycle );
+#endif
+} 
+*/
+
+
