Added support for faulty pagers and their threads to become zombies

Added support for pagers that fault to suspend and become zombies
along with all the threads that they manage. Zombie killing is to
be done at a later time, from this special zombie queue.

The implementation works same as a suspension, with the added action
that the thread is moved to a queue in kernel container.
This commit is contained in:
Bahadir Balban
2009-10-19 18:48:55 +03:00
parent 9177166817
commit cfa35e4a66
8 changed files with 110 additions and 78 deletions

View File

@@ -133,13 +133,6 @@ union ktcb_union {
char kstack[PAGE_SIZE];
};
/* Hash table for all existing tasks */
struct ktcb_list {
struct link list;
struct spinlock list_lock;
int count;
};
/*
* Each task is allocated a unique global id. A thread group can only belong to
* a single leader, and every thread can only belong to a single thread group.
@@ -161,6 +154,8 @@ void tcb_init(struct ktcb *tcb);
struct ktcb *tcb_alloc_init(void);
void tcb_delete(struct ktcb *tcb);
void ktcb_list_add(struct ktcb *new, struct ktcb_list *ktcb_list);
void init_ktcb_list(struct ktcb_list *ktcb_list);
void task_update_utcb(struct ktcb *task);
int tcb_check_and_lazy_map_utcb(struct ktcb *task);