return(ret_val);
}
+
+int sched_task_suspend(task_t *t)
+{
+ int ret_val;
+
+ ret_val = -EALREADY;
+
+ if(!t) {
+ t = task_get_current();
+ }
+
+ task_lock(t);
+
+ if(t->t_state != TASK_STATE_WAITING) {
+ t->t_state = TASK_STATE_WAITING;
+
+ /* remove the task from the ready queue and put it on the wait queue */
+ ret_val = _unq(&_readyq, t);
+
+ if(ret_val >= 0) {
+ _nq(&_waitq, t);
+ }
+ }
+
+ task_unlock(t);
+
+ return(ret_val);
+}
int sched_enqueue(task_t*);
int sched_dequeue(task_t*);
int sched_signal(pid_t);
+int sched_task_suspend(task_t*);
#endif /* __CORE_SCHED_H */