mirror of
https://github.com/drasko/codezero.git
synced 2026-01-15 20:33:16 +01:00
Added wakeup call during exit in case pager was trying to suspend us.
This commit is contained in:
@@ -444,6 +444,7 @@ int sys_thread_control(unsigned int flags, struct task_ids *ids)
|
||||
case THREAD_RECYCLE:
|
||||
ret = thread_recycle(task);
|
||||
break;
|
||||
|
||||
default:
|
||||
ret = -EINVAL;
|
||||
}
|
||||
|
||||
@@ -343,6 +343,12 @@ void sched_die_child(void)
|
||||
BUG_ON(scheduler.prio_total < 0);
|
||||
preempt_enable();
|
||||
|
||||
/*
|
||||
* Clear pager waitqueue in case it issued
|
||||
* a suspend on us (for any reason)
|
||||
*/
|
||||
wake_up(¤t->wqh_pager, 0);
|
||||
|
||||
/*
|
||||
* Unlock task_dead queue,
|
||||
* pager can safely delete us
|
||||
@@ -395,7 +401,7 @@ void sched_suspend_sync(void)
|
||||
* we silently do so. Noone is waiting us.
|
||||
*/
|
||||
if (current->pagerid != current->tid)
|
||||
wake_up_task(tcb_find(current->pagerid), 0);
|
||||
wake_up(¤t->wqh_pager, 0);
|
||||
|
||||
schedule();
|
||||
}
|
||||
|
||||
@@ -141,6 +141,13 @@ void ktcb_list_add(struct ktcb *new, struct ktcb_list *ktcb_list)
|
||||
mutex_unlock(&ktcb_list->list_lock);
|
||||
}
|
||||
|
||||
void __ktcb_list_add_nolock(struct ktcb *new, struct ktcb_list *ktcb_list)
|
||||
{
|
||||
BUG_ON(!list_empty(&new->task_list));
|
||||
BUG_ON(!++ktcb_list->count);
|
||||
list_insert(&new->task_list, &ktcb_list->list);
|
||||
}
|
||||
|
||||
void tcb_add(struct ktcb *new)
|
||||
{
|
||||
struct container *c = new->container;
|
||||
|
||||
Reference in New Issue
Block a user