Index: trunk/kernel/kern/thread.h
===================================================================
--- trunk/kernel/kern/thread.h	(revision 438)
+++ trunk/kernel/kern/thread.h	(revision 440)
@@ -171,10 +171,4 @@
     cxy_t               fork_cxy;        /*! target cluster  for next fork()          */
 
-	xlist_entry_t       children_root;   /*! root of list of attached children        */
-    uint32_t            children_nr;     /*! number of attached children threads      */
-    remote_spinlock_t * children_lock;   /*! lock protecting the children list        */
-
-    xlist_entry_t       brothers_list;   /*! list of attached threads to same parent  */
-
 	list_entry_t        sched_list;      /*! member of threads attached to same core  */
 
@@ -222,9 +216,6 @@
  * in an existing process. It allocates memory for an user thread descriptor in the
  * local cluster, and initializes it from information contained in the arguments.
- * The CPU context is initialized from scratch. If required by the <attr> argument,
- * the new thread is attached to the core specified in <attr>.
+ * The CPU context is initialized from scratch. 
  * It is registered in the local process descriptor specified by the <pid> argument.
- * The thread descriptor pointer is returned to allow the parent thread to register it
- * in its children list.
  * The THREAD_BLOCKED_GLOBAL bit is set => the thread must be activated to start.
  ***************************************************************************************
@@ -325,25 +316,4 @@
 
 /***************************************************************************************
- * This function registers a child thread in the global list of attached
- * children threads of a parent thread.
- * It does NOT take a lock, as this function is always called by the parent thread.
- ***************************************************************************************
- * @ parent_xp : extended pointer on the parent thread descriptor.
- * @ child_xp  : extended pointer on the child thread descriptor.
- **************************************************************************************/
-void thread_child_parent_link( xptr_t  parent_xp,
-                               xptr_t  child_xp );
-
-/***************************************************************************************
- * This function removes an user thread from the parent thread global list
- * of attached children threads.
- ***************************************************************************************
- * @ parent_xp : extended pointer on the parent thread descriptor.
- * @ child_xp  : extended pointer on the child thread descriptor.
- **************************************************************************************/
-void thread_child_parent_unlink( xptr_t parent_xp,
-                                 xptr_t child_xp );
-
-/***************************************************************************************
  * 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
@@ -386,23 +356,23 @@
 
 /***************************************************************************************
- * This function is called to handle the four pthread_cancel(), pthread_exit(),
- * kill() and exit() system calls. It kills a "target" thread identified by the
- * <thread_xp> argument. The "killer" thread can be the "target" thread, when the
- * <is_exit> argument is true. The "killer" thread can run in any cluster, 
- * as it uses remote accesses.
- * If the "target" thread is running in "attached" mode, and the <is_forced> argument
+ * This function is used by the four sys_thread_cancel(), sys_thread_exit(),
+ * sys_kill() and sys_exit() system calls to delete a given thread. 
+ * It set the THREAD_BLOCKED_GLOBAL bit and set the the THREAD_FLAG_REQ_DELETE bit
+ * in the thread descriptor identified by the <thread_xp> argument, to ask the scheduler 
+ * to asynchronously delete the target thread, at the next scheduling point. 
+ * The calling thread can run in any cluster, as it uses remote accesses, but
+ * the target thread cannot be the main thread of the process identified by the <pid>,
+ * because the main thread must be deleted by the parent process argument.
+ * If the target thread is running in "attached" mode, and the <is_forced> argument
  * is false, this function implements the required sychronisation with the joining 
- * thread, blocking the "killer" thread until the pthread_join() syscall is executed.
- * To delete the target thread, this function sets the THREAD_FLAG_REQ_DELETE bit
- * and the THREAD BLOCKED_GLOBAL bit in the target thread, and the actual destruction
- * is asynchronously done by the scheduler at the next scheduling point.
+ * thread, blocking the calling thread until the pthread_join() syscall is executed.
  ***************************************************************************************
  * @ thread_xp   : extended pointer on the target thread.
- * @ is_exit     : the killer thread is the target thread itself.
- * @ is_forced   : the killing does not depends on the attached mode. 
- **************************************************************************************/
-void thread_kill( xptr_t  thread_xp,
-                  bool_t  is_exit,
-                  bool_t  is_forced );
+ * @ pid         : process identifier (to get the owner cluster identifier).
+ * @ is_forced   : the deletion does not depends on the attached mode. 
+ **************************************************************************************/
+void thread_delete( xptr_t  thread_xp,
+                    pid_t   pid,
+                    bool_t  is_forced );
 
 /***************************************************************************************
