source: trunk/kernel/kern/rpc.h @ 649

Last change on this file since 649 was 641, checked in by alain, 5 years ago
  • Fix several bugs.
  • Introduce the "stat" command in KSH.

This almos-mkh version sucessfully executed the FFT application
(65536 complex points) on the TSAR architecture from 1 to 64 cores.

File size: 31.2 KB
Line 
1/*
2 * rpc.h - RPC (Remote Procedure Call) operations definition.
3 *
4 * Author  Alain Greiner (2016,2017,2018)
5 *
6 * Copyright (c) UPMC Sorbonne Universites
7 *
8 * This file is part of ALMOS-MKH.
9 *
10 * ALMOS-MKH is free software; you can redistribute it and/or modify it
11 * under the terms of the GNU General Public License as published by
12 * the Free Software Foundation; version 2.0 of the License.
13 *
14 * ALMOS-MKH is distributed in the hope that it will be useful, but
15 * WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
17 * General Public License for more details.
18 *
19 * You should have received a copy of the GNU General Public License
20 * along with ALMOS-MKH; if not, write to the Free Software Foundation,
21 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
22 */
23
24#ifndef _RPC_H_
25#define _RPC_H_
26
27#include <kernel_config.h>
28#include <hal_kernel_types.h>
29#include <hal_atomic.h>
30#include <bits.h>
31#include <vseg.h>
32#include <remote_fifo.h>
33
34/**** Forward declarations ****/
35
36struct process_s;
37struct page_s;
38struct vseg_s;
39struct exec_info_s;
40struct pthread_attr_s;
41struct remote_sem_s;
42struct user_dir_s;
43struct fragment_s;
44struct vfs_inode_s;
45struct vfs_dentry_s;
46struct vfs_file_s;
47struct thread_s;
48struct mapper_s;
49
50
51/**********************************************************************************/
52/**************  structures for Remote Procedure Calls ****************************/
53/**********************************************************************************/
54
55/***********************************************************************************
56 * This enum defines all RPC indexes.
57 * It must be consistent with the rpc_server[] arrays defined in in the rpc.c file.
58 **********************************************************************************/
59
60typedef enum
61{
62    RPC_UNDEFINED_0               = 0,   //
63    RPC_UNDEFINED_1               = 1,   //
64    RPC_UNDEFINED_2               = 2,   //     
65    RPC_PROCESS_MAKE_FORK         = 3,
66    RPC_USER_DIR_CREATE           = 4,
67    RPC_USER_DIR_DESTROY          = 5,
68    RPC_THREAD_USER_CREATE        = 6,
69    RPC_THREAD_KERNEL_CREATE      = 7,
70    RPC_VFS_FS_UPDATE_DENTRY      = 8,
71    RPC_PROCESS_SIGACTION         = 9,
72
73    RPC_VFS_INODE_CREATE          = 10,
74    RPC_VFS_INODE_DESTROY         = 11,
75    RPC_VFS_DENTRY_CREATE         = 12,
76    RPC_VFS_DENTRY_DESTROY        = 13,
77    RPC_VFS_FILE_CREATE           = 14,
78    RPC_VFS_FILE_DESTROY          = 15,
79    RPC_VFS_FS_NEW_DENTRY         = 16,
80    RPC_VFS_FS_ADD_DENTRY         = 17,
81    RPC_VFS_FS_REMOVE_DENTRY      = 18,
82    RPC_VFS_INODE_LOAD_ALL_PAGES  = 19,
83
84    RPC_UNDEFINED_20              = 20,   //
85    RPC_UNDEFINED_21              = 21,   //
86    RPC_UNDEFINED_22              = 22,   //
87    RPC_UNDEFINED_23              = 23,   //
88    RPC_MAPPER_SYNC               = 24,
89    RPC_VMM_RESIZE_VSEG           = 25,
90    RPC_VMM_REMOVE_VSEG           = 26,
91    RPC_VMM_CREATE_VSEG           = 27,
92    RPC_VMM_SET_COW               = 28,
93    RPC_UNDEFINED_29              = 29,   //
94
95    RPC_MAX_INDEX                 = 30,
96}
97rpc_index_t;
98
99/***********************************************************************************
100 * This defines the prototype of the rpc_server functions,
101 * defined by the rpc_server[] array in the rpc.c file.
102 **********************************************************************************/
103
104typedef  void (rpc_server_t) ( xptr_t xp );
105
106/***********************************************************************************
107 *  This structure defines the RPC descriptor (100 bytes on a 32bits core)
108 **********************************************************************************/
109
110typedef struct rpc_desc_s
111{
112        rpc_index_t         index;       /*! index of requested RPC service      ( 4) */
113        uint32_t          * rsp;         /*! local pointer ond responses counter ( 4) */
114    struct thread_s   * thread;      /*! local pointer on client thread      ( 4) */
115    uint32_t            lid;         /*! index of core running client thread ( 4) */ 
116    bool_t              blocking;    /*! simple RPC mode when true           ( 4) */
117    uint64_t            args[10];    /*! input/output arguments buffer       (80) */
118} 
119rpc_desc_t;
120
121/**********************************************************************************/
122/******* Generic functions supporting RPCs : client side **************************/
123/**********************************************************************************/
124
125/***********************************************************************************
126 * This function is executed by the client thread in the client cluster.
127 * It puts one RPC descriptor defined by the <desc> argument in the remote fifo
128 * defined by the <cxy> argument.  It sends an IPI to the server if fifo is empty.
129 * The RPC descriptor must be allocated in the caller's stack, and initialised by
130 * the caller. It exit with a Panic message if remote fifo is still full after
131 * (CONFIG_RPC_PUT_MAX_ITERATIONS) retries.
132 * - When the RPC <blocking> field is true, this function blocks and deschedule
133 *   the client thread. It returns only when the server completes the RPC and
134 *   unblocks the client thread.
135 * - When the <blocking> field is false, this function returns as soon as the RPC
136 *   has been registered in the FIFO, and the client thread must block itself when
137 *   all RPCS have been registered in all target clusters.
138 ***********************************************************************************
139 * @ cxy   : server cluster identifier
140 * @ desc  : local pointer on RPC descriptor in client cluster
141 **********************************************************************************/
142void rpc_send( cxy_t        cxy,   
143               rpc_desc_t * desc );
144
145
146
147/**********************************************************************************/
148/******* Generic functions supporting RPCs : server side **************************/
149/**********************************************************************************/
150
151/***********************************************************************************
152 * This function contains the infinite loop executed by a RPC server thread,
153 * to handle pending RPCs registered in the RPC fifo attached to a given core.
154 * In each iteration in this loop, it try to handle one RPC request:
155 * - it tries to take the RPC FIFO ownership,
156 * - it consumes one request when the FIFO is not empty,
157 * - it releases the FIFO ownership,
158 * - it execute the requested service,
159 * - it unblock and send an IPI to the client thread,
160 * - it suicides if the number of RPC threads for this core is to large,
161 * - it block on IDLE and deschedule otherwise. 
162 **********************************************************************************/
163void rpc_server_func( void );
164
165/***********************************************************************************
166 * This function is executed in case of illegal RPC index.
167 **********************************************************************************/
168void __attribute__((noinline)) rpc_undefined( xptr_t xp __attribute__ ((unused)) );
169
170
171
172/**********************************************************************************/
173/******* Marshalling functions attached to the various RPCs ***********************/
174/**********************************************************************************/
175
176/***********************************************************************************
177 * [0] undefined
178 **********************************************************************************/
179
180/***********************************************************************************
181 * [1] undefined
182 **********************************************************************************/
183
184/***********************************************************************************
185 * [2] undefined
186 **********************************************************************************/
187
188/***********************************************************************************
189 * [3] The RPC_PROCESS_MAKE_FORK creates a "child" process descriptor, and the
190 * associated "child" thread descriptor in a target remote cluster that can be
191 * any cluster.  The child process is initialized from informations found in the
192 * "parent" process descriptor (that must be the parent reference cluster),
193 * and from the "parent" thread descriptor that can be in any cluster.
194 ***********************************************************************************
195 * @ cxy              : server cluster identifier.
196 * @ ref_process_xp   : [in]  extended pointer on reference parent process.
197 * @ parent_thread_xp : [in]  extended pointer on parent thread.
198 * @ child_pid        : [out] child process identifier.
199 * @ child_thread_ptr : [out] local pointer on child thread.
200 * @ error            : [out]  error status (0 if success).
201 **********************************************************************************/
202void rpc_process_make_fork_client( cxy_t              cxy,
203                                   xptr_t             ref_process_xp,
204                                   xptr_t             parent_thread_xp,
205                                   pid_t            * child_pid,
206                                   struct thread_s ** child_thread_ptr,
207                                   error_t          * error );
208
209void rpc_process_make_fork_server( xptr_t xp );
210
211/***********************************************************************************
212 * [4] The RPC_USER_DIR_CREATE allows a client thread to create an user_dir_t
213 * structure and the associated array of dirents in a remote cluster containing
214 * the target directory <inode>. It creates an ANON vseg in the user reference
215 * process VMM identified by the <ref_xp>. This reference cluster cluster can be
216 * different from both the client and server clusters.
217 * It is called by the sys_opendir() function.
218 ***********************************************************************************
219 * @ cxy        : server cluster identifier.
220 * @ inode      : [in]   local pointer on inode in server cluster.
221 * @ ref_xp     : [in]   extended pointer on user reference process descriptor.
222 * @ dir        : [out]  local pointer on created user_dir structure.
223 **********************************************************************************/
224void rpc_user_dir_create_client( cxy_t                 cxy,
225                                 struct vfs_inode_s  * inode,
226                                 xptr_t                ref_xp,
227                                 struct user_dir_s  ** dir );
228
229void rpc_user_dir_create_server( xptr_t xp );
230
231/***********************************************************************************
232 * [5] The RPC_USER_DIR_DESTROY allows a client thread to delete an user_dir_t
233 * structure and the associated array of dirents in a remote cluster containing
234 * the target directory inode. It is called by the sys_closedir() function.
235 ***********************************************************************************
236 * @ cxy        : server cluster identifier.
237 * @ dir        : [in]  local pointer on created user_dir structure.
238 * @ ref_xp     : [in]   extended pointer on user reference process descriptor.
239 **********************************************************************************/
240void rpc_user_dir_destroy_client( cxy_t               cxy,
241                                  struct user_dir_s * dir,
242                                  xptr_t              ref_xp );
243
244void rpc_user_dir_destroy_server( xptr_t xp );
245
246/***********************************************************************************
247 * [6] The RPC_THREAD_USER_CREATE creates an user thread in the server cluster,
248 * as specified by the arguments. It returns an extended pointer on the new
249 * thread descriptor in server cluster, and an error code.
250 * It is called by the sys_thread_create() system call.
251 ***********************************************************************************
252 * @ cxy       : server cluster identifier.
253 * @ attr      : [in]  local pointer on pthread_attr_t in client cluster.
254 * @ thread_xp : [out] buffer for thread extended pointer.
255 * @ error     : [out] error status (0 if success).
256 **********************************************************************************/
257void rpc_thread_user_create_client( cxy_t                   cxy,
258                                    pid_t                   pid,
259                                    void                  * start_func,
260                                    void                  * start_arg,
261                                    pthread_attr_t        * attr,
262                                    xptr_t                * thread_xp,
263                                    error_t               * error );
264
265void rpc_thread_user_create_server( xptr_t xp );
266
267/***********************************************************************************
268 * [7] The RPC_THREAD_KERNEL_CREATE creates a kernel thread in the server cluster,
269 * as specified by the type, func and args arguments. It returns the local pointer
270 * on the thread descriptor in server cluster and an error code.
271 * It is used by the dev_init() function to create the device server thread.
272 ***********************************************************************************
273 * @ cxy       : server cluster identifier.
274 * @ type      : [in]  type of kernel thread.
275 * @ func      : [in]  local pointer on thread function.
276 * @ args      : [in]  local pointer on function arguments.
277 * @ thread_xp : [out] pointer on buffer for thread extended pointer.
278 * @ error     : [out] error status (0 if success).
279 **********************************************************************************/
280void rpc_thread_kernel_create_client( cxy_t     cxy,
281                                      uint32_t  type,
282                                      void    * func,
283                                      void    * args,
284                                      xptr_t  * thread_xp,
285                                      error_t * error );
286
287void rpc_thread_kernel_create_server( xptr_t xp );
288
289/***********************************************************************************
290 * [8] The RPC_VFS_FS_UPDATE_DENTRY allows a client thread to request a remote
291 * cluster to update the <size> field of a directory entry in the mapper of a
292 * remote directory inode, identified by the <inode> local pointer.
293 * The target entry name is identified by the <dentry> local pointer.
294 ***********************************************************************************
295 * @ cxy     : server cluster identifier.
296 * @ inode   : [in] local pointer on remote directory inode.
297 * @ dentry  : [in] local pointer on remote dentry.
298 * @ size    : [in] new size value.
299 * @ error   : [out] error status (0 if success).
300 **********************************************************************************/
301void rpc_vfs_fs_update_dentry_client( cxy_t                 cxy,
302                                      struct vfs_inode_s  * inode,
303                                      struct vfs_dentry_s * dentry,
304                                      uint32_t              size,
305                                      error_t             * error );
306
307void rpc_vfs_fs_update_dentry_server( xptr_t xp );
308
309/***********************************************************************************
310 * [9] The RPC_PROCESS_SIGACTION allows a client thread to request a remote cluster
311 * to execute a given sigaction, defined by the <action_type> for a given process,
312 * identified by the <pid> argument.
313 ***********************************************************************************
314 * @ cxy     : server cluster identifier.
315 * @ pid     : [in] target process identifier.
316 * @ action  : [in] sigaction index.
317 **********************************************************************************/
318void rpc_process_sigaction_client( cxy_t     cxy,
319                                   pid_t     pid,
320                                   uint32_t  action );
321                             
322void rpc_process_sigaction_server( xptr_t xp );
323
324/***********************************************************************************
325 * [10] The RPC_VFS_INODE_CREATE creates an inode and the associated mapper in a
326 * remote cluster. The parent dentry must have been previously created.
327 * It returns an extended pointer on the created inode.
328 ***********************************************************************************
329 * @ cxy        :  server cluster identifier.
330 * @ fs_type    : [in]  file system type.
331 * @ inode_type : [in]  file system type.
332 * @ attr       : [in]  inode attributes.
333 * @ rights     : [in]  access rights
334 * @ uid        : [in]  user ID
335 * @ gid        : [in]  group ID
336 * @ inode_xp   : [out] buffer for extended pointer on created inode.
337 * @ error      : [out] error status (0 if success).
338 **********************************************************************************/
339void rpc_vfs_inode_create_client( cxy_t      cxy,
340                                  uint32_t   fs_type,
341                                  uint32_t   attr,   
342                                  uint32_t   rights, 
343                                  uint32_t   uid,
344                                  uint32_t   gid,
345                                  xptr_t   * inode_xp,
346                                  error_t  * error );
347
348void rpc_vfs_inode_create_server( xptr_t xp );
349
350/***********************************************************************************
351 * [11] The RPC_VFS_INODE_DESTROY releases memory allocated for an inode descriptor
352 * and for the associated mapper in a remote cluster.
353 ***********************************************************************************
354 * @ cxy       :  server cluster identifier
355 * @ inode     : [in]  local pointer on inode.
356 **********************************************************************************/
357void rpc_vfs_inode_destroy_client( cxy_t                cxy,
358                                   struct vfs_inode_s * inode );
359
360void rpc_vfs_inode_destroy_server( xptr_t xp );
361
362/***********************************************************************************
363 * [12] The RPC_VFS_DENTRY_CREATE creates a dentry in a remote cluster.
364 * It returns an extended pointer on the created dentry.
365 ***********************************************************************************
366 * @ cxy        :  server cluster identifier
367 * @ type       : [in]  file system type.
368 * @ name       : [in]  directory entry name.
369 * @ dentry_xp  : [out] buffer for extended pointer on created dentry.
370 * @ error      : [out] error status (0 if success).
371 **********************************************************************************/
372void rpc_vfs_dentry_create_client( cxy_t                  cxy,
373                                   uint32_t               type,
374                                   char                 * name,   
375                                   xptr_t               * dentry_xp,
376                                   error_t              * error );
377
378void rpc_vfs_dentry_create_server( xptr_t xp );
379
380/***********************************************************************************
381 * [13] The RPC_VFS_DENTRY_DESTROY remove a denfry from the parent inode XHTAB,
382 * and releases memory allocated for the dentry descriptor in a remote cluster.
383 ***********************************************************************************
384 * @ cxy       :  server cluster identifier
385 * @ dentry     : [in]  local pointer on dentry.
386 **********************************************************************************/
387void rpc_vfs_dentry_destroy_client( cxy_t                 cxy,
388                                    struct vfs_dentry_s * dentry );
389
390void rpc_vfs_dentry_destroy_server( xptr_t xp );
391
392/***********************************************************************************
393 * [14] The RPC_VFS_FILE_CREATE creates a file descriptor in a remote cluster.
394 * It returns an extended pointer on the created file structure.
395 ***********************************************************************************
396 * @ cxy        :  server cluster identifier
397 * @ inode      : [in]  local pointer on parent inode.
398 * @ file_attr  : [in]  new file attributes.
399 * @ file_xp    : [out] buffer for extended pointer on created file.
400 * @ error      : [out] error status (0 if success).
401 **********************************************************************************/
402void rpc_vfs_file_create_client( cxy_t                  cxy,
403                                 struct vfs_inode_s   * inode,
404                                 uint32_t               file_attr,
405                                 xptr_t               * file_xp,
406                                 error_t              * error );
407
408void rpc_vfs_file_create_server( xptr_t xp );
409
410/***********************************************************************************
411 * [15] The RPC_VFS_FILE_DESTROY releases memory allocated for a file descriptor
412 * in a remote cluster.
413 ***********************************************************************************
414 * @ cxy       :  server cluster identifier
415 * @ file       : [in]  local pointer on file.
416 **********************************************************************************/
417void rpc_vfs_file_destroy_client( cxy_t               cxy,
418                                  struct vfs_file_s * file );
419
420void rpc_vfs_file_destroy_server( xptr_t xp );
421
422/***********************************************************************************
423 * [16] The RPC_VFS_FS_GET_DENTRY calls the vfs_fs_new_dentry()
424 * function in a remote cluster containing a parent inode directory to scan the
425 * associated mapper, find a directory entry identified by its name, and update
426 * both the - existing - child inode and dentry.
427 ***********************************************************************************
428 * @ cxy            : server cluster identifier
429 * @ parent_inode   : [in]  local pointer on parent inode.
430 * @ name           : [in]  local pointer on child name (in client cluster).
431 * @ child_inode_xp : [in]  extended pointer on child inode (in another cluster).
432 * @ error          : [out] error status (0 if success).
433 **********************************************************************************/
434void rpc_vfs_fs_new_dentry_client( cxy_t                cxy,
435                                   struct vfs_inode_s * parent_inode,
436                                   char               * name,
437                                   xptr_t               child_inode_xp,
438                                   error_t            * error );
439
440void rpc_vfs_fs_new_dentry_server( xptr_t xp );
441
442/***********************************************************************************
443 * [17] The RPC_VFS_FS_ADD_DENTRY calls the vfs_fs_add_dentry() function in a
444 * remote cluster containing a directory inode and mapper, to add a new dentry
445 * in the mapper of this directory.
446 ***********************************************************************************
447 * @ cxy            : server cluster identifier
448 * @ parent         : [in]  local pointer on directory inode.
449 * @ dentry         : [in]  local pointer on dentry.
450 * @ error          : [out] error status (0 if success).
451 **********************************************************************************/
452void rpc_vfs_fs_add_dentry_client( cxy_t,
453                                   struct vfs_inode_s  * parent,
454                                   struct vfs_dentry_s * dentry,
455                                   error_t             * error );
456
457void rpc_vfs_fs_add_dentry_server( xptr_t xp );
458
459/***********************************************************************************
460 * [18] The RPC_VFS_FS_REMOVE_DENTRY calls the vfs_fs_remove_dentry() function in a
461 * remote cluster containing a directory inode and mapper, to remove a dentry from
462 * the mapper of this directory.
463 ***********************************************************************************
464 * @ cxy            : server cluster identifier
465 * @ parent         : [in]  local pointer on directory inode.
466 * @ dentry         : [in]  local pointer on dentry.
467 * @ error          : [out] error status (0 if success).
468 **********************************************************************************/
469void rpc_vfs_fs_remove_dentry_client( cxy_t,
470                                      struct vfs_inode_s  * parent,
471                                      struct vfs_dentry_s * dentry,
472                                      error_t             * error );
473
474void rpc_vfs_fs_remove_dentry_server( xptr_t xp );
475
476/***********************************************************************************
477 * [19] The RPC_VFS_INODE_LOAD_ALL_PAGES calls the vfs_inode_load_all_pages()
478 * function a remote cluster containing an inode to load all pages in the
479 * associated mapper. 
480 ***********************************************************************************
481 * @ cxy     : server cluster identifier
482 * @ inode   : [in]  local pointer on inode in server cluster.
483 * @ error   : [out] error status (0 if success).
484 **********************************************************************************/
485void rpc_vfs_inode_load_all_pages_client( cxy_t                cxy,
486                                          struct vfs_inode_s * inode,
487                                          error_t            * error );
488
489void rpc_vfs_inode_load_all_pages_server( xptr_t xp );
490
491/***********************************************************************************
492 * [20] undefined
493 **********************************************************************************/
494
495/***********************************************************************************
496 * [21] undefined
497 **********************************************************************************/
498
499/***********************************************************************************
500 * [22] undefined
501 **********************************************************************************/
502
503/***********************************************************************************
504 * [23] undefined
505 **********************************************************************************/
506
507/***********************************************************************************
508 * [24] The RPC_MAPPER_SYNC allows a client thread to synchronize on disk
509 * all dirty pages of a remote mapper.
510 ***********************************************************************************
511 * @ cxy       : server cluster identifier.
512 * @ mapper    : [in] local pointer on mapper in server cluster.
513 * @ error       : [out] error status (0 if success).
514 **********************************************************************************/
515void rpc_mapper_sync_client( cxy_t             cxy,
516                             struct mapper_s * mapper,
517                             error_t         * error );
518
519void rpc_mapper_sync_server( xptr_t xp );
520
521/***********************************************************************************
522 * [25] The RPC_VMM_RESIZE_VSEG allows a client thread to request a remote cluster
523 * to resize a vseg identified by the <base> argument in a process descriptor
524 * identified by the <pid> argument, as defined by the <new_base> and <new_size>
525 * arguments. Both the VSL and the GPT are updated in the remote cluster.
526 ***********************************************************************************
527 * @ cxy         : server cluster identifier.
528 * @ pid         : [in] process identifier.
529 * @ base        : [in] vseg base.
530 * @ new_base    : [in] new vseg base.
531 * @ new_size    : [in] new vseg size.
532 **********************************************************************************/
533void rpc_vmm_resize_vseg_client( cxy_t              cxy,
534                                 pid_t              pid,
535                                 intptr_t           base,
536                                 intptr_t           new_base,
537                                 intptr_t           new_size );
538 
539void rpc_vmm_resize_vseg_server( xptr_t xp );
540
541/***********************************************************************************
542 * [26] The RPC_VMM_REMOVE_VSEG allows a client thread  to request a remote cluster
543 * to delete a vseg identified by the <vaddr> argument in a process descriptor
544 * identified by the <pid> argument.
545 * Both the VSL and the GPT are updated in the remote cluster.
546 ***********************************************************************************
547 * @ cxy       : server cluster identifier.
548 * @ pid       : [in] process identifier.
549 * @ base      : [in] vseg base.
550 **********************************************************************************/
551void rpc_vmm_remove_vseg_client( cxy_t      cxy,
552                                 pid_t      pid,
553                                 intptr_t   base );
554 
555void rpc_vmm_remove_vseg_server( xptr_t xp );
556
557/***********************************************************************************
558 * [27] The RPC_VMM_CREATE_VSEG allows a client thread to request the remote
559 * reference cluster of a given process to allocate and register in the reference
560 * process VMM a new vseg descriptor.
561 * On the server side, this RPC uses the vmm_create_vseg() function, and returns
562 * to the client the local pointer on the created vseg descriptor.
563 ***********************************************************************************
564 * @ cxy         : server cluster identifier.
565 * @ process     : [in]  local pointer on process descriptor in server.
566 * @ type        : [in]  vseg type.
567 * @ base        : [in]  base address (unused for dynamically allocated vsegs).
568 * @ size        : [in]  number of bytes.
569 * @ file_offset : [in]  offset in file (for CODE, DATA, FILE types).
570 * @ file_size   : [in]  can be smaller than size for DATA type.
571 * @ mapper_xp   : [in]  extended pointer on mapper (for CODE, DATA, FILE types).
572 * @ vseg_cxy    : [in]  target cluster for mapping (if not data type).
573 * @ vseg        : [out] local pointer on vseg descriptor / NULL if failure.
574 **********************************************************************************/
575void rpc_vmm_create_vseg_client( cxy_t              cxy,
576                                 struct process_s * process,
577                                 vseg_type_t        type,
578                                 intptr_t           base,
579                                 uint32_t           size,
580                                 uint32_t           file_offset,
581                                 uint32_t           file_size,
582                                 xptr_t             mapper_xp,
583                                 cxy_t              vseg_cxy,
584                                 struct vseg_s   ** vseg );
585
586void rpc_vmm_create_vseg_server( xptr_t xp );
587
588/***********************************************************************************
589 * [28] The RPC_VMM_SET_COW allows a client thread to request the remote reference
590 * cluster to set the COW flag and reset the WRITABLE flag of all GPT entries for
591 * the DATA, MMAP and REMOTE vsegs of process identified by the <process> argument.
592
593 * of a remote scheduler, identified by the <lid> argument.
594 ***********************************************************************************
595 * @ cxy         : server cluster identifier.
596 * @ process     : [in]  local pointer on reference process descriptor.
597 **********************************************************************************/
598void rpc_vmm_set_cow_client( cxy_t              cxy,
599                             struct process_s * process );
600
601void rpc_vmm_set_cow_server( xptr_t xp );
602
603/***********************************************************************************
604 * [29] undefined
605 **********************************************************************************/
606
607
608#endif
Note: See TracBrowser for help on using the repository browser.