Index: trunk/kernel/kern/process.h
===================================================================
--- trunk/kernel/kern/process.h	(revision 436)
+++ trunk/kernel/kern/process.h	(revision 440)
@@ -101,9 +101,10 @@
  * 4) The <sem_root>, <mutex_root>, <barrier_root>, <condvar_root>, and the associated
  *    <sync_lock>, that are dynamically allocated, are only defined in the reference cluster.
- * 5) The <children_root>, <children_nr>, <brothers_list>, and <txt_list> fields are only
+ * 5) The <children_root>, <children_nr>, <children_list>, and <txt_list> fields are only
  *    defined in the reference cluster, and are undefined in other clusters.
  * 6) The <local_list>, <copies_list>, <th_tbl>, <th_nr>, <th_lock> fields
  *    are defined in all process descriptors copies.
  * 7) The termination <flags> and <exit_status> are only defined in the reference cluster.
+ *    The term state format is defined in the shared_syscalls.h file.
  ********************************************************************************************/
 
@@ -282,8 +283,8 @@
  * all threads of a process identified by the <pid> argument, depending on the 
  * <action_type> argument.
- * WARNING : the DELETE action is NOT executed on the target process main thread
- * (thread 0 in process owner cluster).
+ * WARNING : the DELETE and BLOCK actions are NOT executed on the target process main thread
+ * (thread 0 in process owner cluster), and not executed on the calling thread itself.
  * It uses the multicast, non blocking rpc_process_sigaction_client() function to send
- * parallel requests to all remote clusters containing a process copy. 
+ * parallel requests to all remote clusters containing process copies. 
  * Then it blocks and deschedule to wait completion of these parallel requests.
  *
@@ -305,13 +306,30 @@
 
 /*********************************************************************************************
- * This function blocks all threads - but the main thread - for a given <process> 
- * in a given cluster. It sets the THREAD_BLOCKED_GLOBAL bit in the thread descriptor, 
- * and request the relevant schedulers to acknowledge the blocking, using IPI if required. 
+ * This function blocks all threads for a given <process> in the local cluster. 
+ * It scan the list of local thread, and sets the THREAD_BLOCKED_GLOBAL bit for all
+ * threads, BUT the main thread (thread 0 in owner cluster), and the client thread
+ * identified by the <client_xp> argument. It request the relevant schedulers to acknowledge
+ * the blocking, using IPI if required, and returns only when all blockable threads 
+ * in cluster are actually blocked.
  * The threads are not detached from the scheduler, and not detached from the local process.
- * This function returns only when all blockable threads in cluster are actually blocked.
  *********************************************************************************************
  * @ process     : pointer on the target process descriptor.
- ********************************************************************************************/
-void process_block_threads( process_t * process );
+ * @ client_xp   : extended pointer on the client thread that should not be blocked.
+ ********************************************************************************************/
+void process_block_threads( process_t * process,
+                            xptr_t      client_xp );
+
+/*********************************************************************************************
+ * This function marks for deletion all threads for a given <process> in the local cluster.
+ * It scan the list of local thread, and sets the THREAD_FLAG_REQ_DELETE bit for all
+ * threads, BUT the main thread (thread 0 in owner cluster), and the client thread
+ * identified by the <client_xp> argument. 
+ * The actual deletion will be done by the scheduler at the next scheduling point.
+ *********************************************************************************************
+ * @ process     : pointer on the process descriptor.
+ * @ client_xp   : extended pointer on the client thread that should not be marked.
+ ********************************************************************************************/
+void process_delete_threads( process_t * process,
+                            xptr_t       client_xp );
 
 /*********************************************************************************************
@@ -321,18 +339,4 @@
  ********************************************************************************************/
 void process_unblock_threads( process_t * process );
-
-/*********************************************************************************************
- * This function marks for deletion all threads - but the main thread - for a given <process>
- * in a given cluster. It sets the THREAD_FLAG_REQ_DELETE bit. For each marked thread,
- * the following actions will be done by the scheduler at the next scheduling point: 
- * - the thread will be detached from the scheduler.
- * - the thread will be detached from the local process descriptor.
- * - the thread will be detached from parent if required.
- * - the memory allocated to the thread descriptor is released.
- * - the memory allocated to the process descriptor is released, if it is the last thread.
- *********************************************************************************************
- * @ process     : pointer on the process descriptor.
- ********************************************************************************************/
-void process_delete_threads( process_t * process );
 
 /*********************************************************************************************
@@ -398,5 +402,4 @@
                             struct thread_s ** child_thread_ptr );
 
-
 /********************   File Management Operations   ****************************************/
 
