Initial commit

This commit is contained in:
Bahadir Balban
2008-01-13 13:53:52 +00:00
commit e2b791a3d8
789 changed files with 95825 additions and 0 deletions

36
src/generic/tcb.c Normal file
View File

@@ -0,0 +1,36 @@
/*
* Some ktcb related data
*
* Copyright (C) 2007 Bahadir Balban
*/
#include <l4/generic/tcb.h>
#include <l4/generic/space.h>
#include <l4/lib/idpool.h>
/* ID pools for threads and spaces. */
struct id_pool *thread_id_pool;
struct id_pool *space_id_pool;
/* Hash table for all existing tasks */
struct list_head global_task_list;
/* Offsets for ktcb fields that are accessed from assembler */
unsigned int need_resched_offset = offsetof(struct ktcb, ts_need_resched);
unsigned int syscall_regs_offset = offsetof(struct ktcb, syscall_regs);
#if 0
int task_suspend(struct ktcb *task)
{
task->flags |= SCHED_FLAG_SUSPEND;
return 0;
}
int task_resume(struct ktcb *task)
{
task->flags &= ~SCHED_FLAG_SUSPEND;
return sched_enqueue_task(task);
}
#endif