Index: trunk/kernel/kern/rpc.h
===================================================================
--- trunk/kernel/kern/rpc.h	(revision 407)
+++ trunk/kernel/kern/rpc.h	(revision 408)
@@ -60,6 +60,6 @@
 {
     RPC_PMEM_GET_PAGES         = 0,
-    RPC_PROCESS_PID_ALLOC      = 1,
-    RPC_PROCESS_EXEC           = 2,
+    RPC_PROCESS_MAKE_EXEC      = 1,      
+    RPC_PROCESS_MAKE_FORK      = 2,
     RPC_PROCESS_KILL           = 3,
     RPC_THREAD_USER_CREATE     = 4,
@@ -85,5 +85,5 @@
     RPC_VMM_CREATE_VSEG        = 26,
     RPC_SCHED_DISPLAY          = 27,
-
+    RPC_VMM_SET_COW            = 28,
     RPC_MAX_INDEX              = 30,
 }
@@ -186,33 +186,43 @@
 
 /***********************************************************************************
- * [1] The RPC_PROCESS_PID_ALLOC allocates one new PID in a remote cluster, registers
- * the new process in the remote cluster, and returns the PID, and an error code.
+ * [1] The RPC_PROCESS_MAKE_EXEC creates a new process descriptor, from an existing
+ * process descriptor in a remote server cluster. This server cluster must be 
+ * the owner cluster for the existing process. The new process descriptor is 
+ * initialized from informations found in the <exec_info> structure.
+ * A new main thread descriptor is created in the server cluster.
+ * All copies of the old process descriptor and all old threads are destroyed.
  ***********************************************************************************
  * @ cxy     : server cluster identifier.
- * @ process : [in]  local pointer on process descriptor in client cluster.
+ * @ process : [in]  local pointer on the exec_info structure in client cluster.
  * @ error   : [out] error status (0 if success).
- * @ pid     : [out] new process identifier.
- **********************************************************************************/
-void rpc_process_pid_alloc_client( cxy_t              cxy,
-                                   struct process_s * process,
-                                   error_t          * error,
-                                   pid_t            * pid );
-
-void rpc_process_pid_alloc_server( xptr_t xp );
-
-/***********************************************************************************
- * [2] The RPC_PROCESS_EXEC creates a process descriptor copy, in a remote cluster
- * and initializes if from information found in the reference process descriptor.
- * This remote cluster becomes the new reference cluster.
- ***********************************************************************************
- * @ cxy     : server cluster identifier.
- * @ info    : [in]   pointer on local exec_info structure.
- * @ error   : [out]  error status (0 if success).
- **********************************************************************************/
-void rpc_process_exec_client( cxy_t                cxy,
-                              struct exec_info_s * info,
-                              error_t            * error );
-
-void rpc_process_exec_server( xptr_t xp );
+ **********************************************************************************/
+void rpc_process_make_exec_client( cxy_t                cxy,
+                                   struct exec_info_s * info, 
+                                   error_t            * error );
+
+void rpc_process_make_exec_server( xptr_t xp );
+
+/***********************************************************************************
+ * [2] The RPC_PROCESS_MAKE_FORK creates a "child" process descriptor, and the
+ * associated "child" thread descriptor in a target remote cluster that can be 
+ * any cluster.  The child process is initialized from informations found in the 
+ * "parent" process descriptor (that must be the parent reference cluster),
+ * and from the "parent" thread descriptor that can be in any cluster.
+ ***********************************************************************************
+ * @ cxy              : server cluster identifier.
+ * @ ref_process_xp   : [in]  extended pointer on reference parent process.
+ * @ parent_thread_xp : [in]  extended pointer on parent thread.
+ * @ child_pid        : [out] child process identifier.
+ * @ child_thread_ptr : [out] local pointer on child thread.
+ * @ error            : [out]  error status (0 if success).
+ **********************************************************************************/
+void rpc_process_make_fork_client( cxy_t              cxy,
+                                   xptr_t             ref_process_xp,
+                                   xptr_t             parent_thread_xp,
+                                   pid_t            * child_pid,
+                                   struct thread_s ** child_thread_ptr,
+                                   error_t          * error );
+
+void rpc_process_make_fork_server( xptr_t xp );
 
 /***********************************************************************************
@@ -613,3 +623,18 @@
 void rpc_sched_display_server( xptr_t xp );
 
+/***********************************************************************************
+ * [28] The RPC_VMM_SET_COW allows a client thread to request the remote reference
+ * cluster to set the COW flag and reset the WRITABLE flag of all GPT entries for
+ * the DATA, MMAP and REMOTE vsegs of process identified by the <process> argument.
+
+ * of a remote scheduler, identified by the <lid> argument.
+ ***********************************************************************************
+ * @ cxy         : server cluster identifier.
+ * @ process     : [in]  local pointer on reference process descriptor.
+ **********************************************************************************/
+void rpc_vmm_set_cow_client( cxy_t              cxy,
+                             struct process_s * process );
+
+void rpc_vmm_set_cow_server( xptr_t xp );
+
 #endif
