Index: trunk/kernel/kern/thread.h
===================================================================
--- trunk/kernel/kern/thread.h	(revision 409)
+++ trunk/kernel/kern/thread.h	(revision 416)
@@ -72,5 +72,6 @@
 #define THREAD_FLAG_JOIN_DONE    0x0002  /*! Parent thread made a join                */
 #define THREAD_FLAG_SCHED        0x0004  /*! Scheduling required for this thread      */
-#define THREAD_FLAG_SIGNAL       0x0004  /*! Acknowledge of descheduling required     */
+#define THREAD_FLAG_REQ_ACK      0x0008  /*! Acknowledge required from scheduler      */
+#define THREAD_FLAG_REQ_DELETE   0x0010  /*! Destruction required by scheduler        */
 
 /***************************************************************************************
@@ -119,5 +120,5 @@
  * - The TRDID 16 MSB bits contain the CXY of cluster containing the thread.
  * - The LTID is used to index the th_tbl[] array in the local process descriptor.
- * This TRDID is computed by the process_register_thread() function, when the user
+ _* This TRDID is computed by the process_register_thread() function, when the user
  * thread is registered in the local copy of the process descriptor.
  *
@@ -153,5 +154,5 @@
     xptr_t              join_xp;         /*! extended pointer on joining thread       */
 
-    uint32_t          * sig_rsp_count;   /*! pointer on signal response counter       */
+    uint32_t          * ack_rsp_count;   /*! pointer on acknowledge response counter  */
 
 	intptr_t            u_stack_base;    /*! user stack base address                  */
@@ -345,28 +346,28 @@
 
 /***************************************************************************************
- * This function is used by a killer thread running in the same cluster as a target
- * thread to request the scheduler of the target to call the thread_handle_signal()
- * at the next context switch, to confirm that the target thread is blocked and
- * not currently running. This function executes atomically the following actions :
- * - it set the sig_pending flag in the target scheduler descriptor.
- * - it set the SIG flag in the "flags" field of the target thread descriptor.
+ * This function is used by a "blocker" thread running in the same cluster as a "target"
+ * thread to request the scheduler of the target thread to acknowledge that the target
+ * thread is blocked and not running, at the next context switch.
+ * This function executes atomically the following actions :
+ * - it set the request_pending boolean in the target scheduler descriptor.
+ * - it set the REQ_ACK flag in the "flags" field of the target thread descriptor.
  * - It registers the responses counter pointer in the target thread descriptor.
- * The sig_pending flag is handled as a set/reset flip-flop by the killer thread
- * and by the target scheduler. 
+ * The request_pending flag is handled as a set/reset flip-flop by the "blocker" thread
+ * and by the "target" scheduler. 
  ***************************************************************************************
  * @ target        : local pointer on target thread.
- * @ sig_rsp_count : local pointer on responses counter.
- **************************************************************************************/
-void thread_set_signal( thread_t * thread,
-                        uint32_t * sig_rsp_count );
-
-/***************************************************************************************
- * This function is used by the sched_handle_signal() function executed by a scheduler
- * to reset a pending signal in both a target <thread> descriptor, and in the target
- * thread scheduler.
- ***************************************************************************************
- * @ thread    : local pointer on target thread.
- **************************************************************************************/
-void thread_reset_signal( thread_t * thread );
+ * @ ack_rsp_count : local pointer on responses counter.
+ **************************************************************************************/
+void thread_set_req_ack( thread_t * target,
+                         uint32_t * ack_rsp_count );
+
+/***************************************************************************************
+ * This function is used by the sched_handle_signal() function executed by the 
+ * scheduler of a "target" thread to reset a "blocked not running" acknowledge request
+ * in both the target thread descriptor, and in the target  thread scheduler.
+ ***************************************************************************************
+ * @ target    : local pointer on target thread.
+ **************************************************************************************/
+void thread_reset_req_ack( thread_t * target );
 
 /***************************************************************************************
@@ -390,11 +391,12 @@
  * If not, the client thread must use the RPC_THREAD_KILL.
  * - When the killer thread is running on the same core as the target thread,
- *   This function simply detach the target thread from the scheduler,
- *   detach it from the parent thread if it is attached, detach it from the 
- *   local process descriptor, and rrleases all memory allocated to the thread.
- * - When the killer thread is running on a different core than the target thread
- *   The killer send a signal to the target thread scheduler requesting this
- *   scheduler to confirm that the target thread is blocked and not running.
- *   Then, it executes the same actions as described above.
+ *   this function simply set the BLOCKED_ GLOBAL bit and the REQ_DELETE flag
+ *   in the target thread descriptor and return.
+ * - When the killer thread is running on a different core than the target thread,
+ *   the killer set the BLOCKED_GLOBAL bit and the REQ_ACK flag in target  thread,
+ *   to ask the scheduler to confirm that the target is blocked and not running.
+ *   Then, it set the REQ_DELETE flag in the target thread and return.
+ * In both cases, the actual target thread destruction is done by the scheduler
+ * at the next scheduling point.
  ***************************************************************************************
  * @ thread   : local pointer on the target thread.
