diff --git a/src/task.c b/src/task.c index cc70f0a770b5d414ed0bf754ab461fda171d77d1..b1886035f3415ed82d31ed65b0e061569a034cd6 100644 --- a/src/task.c +++ b/src/task.c @@ -271,48 +271,6 @@ void task_rmunlock_blind(struct task *ta, struct task *tb) { lock_unlock_blind(&ta->lock); } -/** - * @brief Add an unlock_task to the given task. - * - * @param ta The unlocking #task. - * @param tb The #task that will be unlocked. - */ - -void task_addunlock(struct task *ta, struct task *tb) { - - error("Use sched_addunlock instead."); - - /* Add the lock atomically. */ - ta->unlock_tasks[atomic_inc(&ta->nr_unlock_tasks)] = tb; - - /* Check a posteriori if we did not overshoot. */ - if (ta->nr_unlock_tasks > task_maxunlock) - error("Too many unlock_tasks in task."); -} - -void task_addunlock_old(struct task *ta, struct task *tb) { - - int k; - - lock_lock(&ta->lock); - - /* Check if ta already unlocks tb. */ - for (k = 0; k < ta->nr_unlock_tasks; k++) - if (ta->unlock_tasks[k] == tb) { - error("Duplicate unlock."); - lock_unlock_blind(&ta->lock); - return; - } - - if (ta->nr_unlock_tasks == task_maxunlock) - error("Too many unlock_tasks in task."); - - ta->unlock_tasks[ta->nr_unlock_tasks] = tb; - ta->nr_unlock_tasks += 1; - - lock_unlock_blind(&ta->lock); -} - /** * @brief Prints the list of tasks contained in a given mask * diff --git a/src/task.h b/src/task.h index 8a1f191b442fd81e8097e320cda26fcd606b69d6..51a44b3127694a60da772ca4e728073b15ac1147 100644 --- a/src/task.h +++ b/src/task.h @@ -98,7 +98,6 @@ struct task { void task_rmunlock(struct task *ta, struct task *tb); void task_rmunlock_blind(struct task *ta, struct task *tb); void task_cleanunlock(struct task *t, int type); -void task_addunlock(struct task *ta, struct task *tb); void task_unlock(struct task *t); float task_overlap(const struct task *ta, const struct task *tb); int task_lock(struct task *t);