Index: generic/src/proc/task.c
===================================================================
--- generic/src/proc/task.c	(revision 2569ec90628757660b8e028954d0481dcbb2c3d7)
+++ generic/src/proc/task.c	(revision c74804f28b7b08a060cdaca6668ae4900f252ed8)
@@ -239,4 +239,9 @@
  * and interrupts must be disabled.
  *
+ * The task is guaranteed to exist after it was found in the tasks_btree as long as:
+ * @li the tasks_lock is held,
+ * @li the task's lock is held when task's lock is acquired before releasing tasks_lock or
+ * @li the task's refcount is grater than 0
+ *
  * @param id Task ID.
  *
Index: generic/src/proc/thread.c
===================================================================
--- generic/src/proc/thread.c	(revision 2569ec90628757660b8e028954d0481dcbb2c3d7)
+++ generic/src/proc/thread.c	(revision c74804f28b7b08a060cdaca6668ae4900f252ed8)
@@ -549,4 +549,7 @@
  * interrupts must be already disabled.
  *
+ * When a thread is found in threads_btree, it is guaranteed to exist as long
+ * as the threads_lock is held.
+ *
  * @param t Pointer to thread.
  *
