mirror of
https://github.com/drasko/codezero.git
synced 2026-04-06 20:19:04 +02:00
Managed to self-destruct pager.
Issues: - A page-faulting thread suspends if receives -1 from pager page fault ipc. This is fine if pager is about to delete the thread, but it is not if it is a buggy pager. - Need to find a way to completely get rid of suspended pager. - A method of deleting suspended tasks could remedy both cases above.
This commit is contained in:
@@ -187,10 +187,17 @@ void handle_requests(void)
|
||||
|
||||
void main(void)
|
||||
{
|
||||
struct task_ids ids;
|
||||
|
||||
l4_getid(&ids);
|
||||
|
||||
printf("\n%s: Started with thread id %d\n", __TASKNAME__, self_tid());
|
||||
|
||||
init();
|
||||
|
||||
printf("\n%s: Destroying self (%d), along with any tasks.\n", __TASKNAME__, self_tid());
|
||||
l4_thread_control(THREAD_DESTROY, &ids);
|
||||
|
||||
printf("%s: Memory/Process manager initialized. Listening requests.\n", __TASKNAME__);
|
||||
while (1) {
|
||||
handle_requests();
|
||||
|
||||
Reference in New Issue
Block a user