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:
Bahadir Balban
2009-10-19 00:33:10 +03:00
parent c3b0399485
commit 9177166817
10 changed files with 162 additions and 36 deletions

View File

@@ -28,6 +28,7 @@
#define TASK_INTERRUPTED (1 << 0)
#define TASK_SUSPENDING (1 << 1)
#define TASK_RESUMING (1 << 2)
#define TASK_EXITING (1 << 3)
/* Task states */
enum task_state {

View File

@@ -4,11 +4,14 @@
#ifndef __THREAD_H__
#define __THREAD_H__
#include <l4/generic/tcb.h>
/* Thread id creation and deleting */
void thread_id_pool_init(void);
int thread_id_new(void);
int thread_id_del(int tid);
void thread_destroy_self(void);
int thread_destroy(struct task_ids *ids);
#endif /* __THREAD_H__ */

View File

@@ -91,6 +91,8 @@ static inline int is_err(int x)
#define BUG_ON(x) {if (x) BUG();}
#define WARN_ON(x) {if (x) printk("%s, %s, %s: Warning something is off here.\n", __FILE__, __FUNCTION__, __LINE__); }
#define BUG_ON_MSG(msg, x) do { \
printk(msg); \
BUG_ON(x) \