+/**
+ * \brief Removes the current thread from the active queue
+ * \warning This should ONLY be called with task switches disabled
+ * \return Current thread pointer
+ */
+tThread *Threads_RemActive(void)
+{
+ tThread *ret = Proc_GetCurThread();
+ tThread *prev = Threads_int_GetPrev(&gActiveThreads, ret);
+ if(!prev) return NULL;
+ ret->Remaining = 0;
+ ret->CurCPU = -1;
+ prev->Next = ret->Next;
+ giNumActiveThreads --;
+ return ret;
+}
+