Files
codezero/tasks/fs0/include/task.h
Bahadir Balban 54a9b2901d Removed allocation of utcb shared pages by mm0 completely.
- Now libl4 has no references to utcb page or shmat etc.
- Pager does not deal with special case utcb page allocation.
  It instead allocates a shared page from shm memory pool.
- All tasks working to original standard.

Next:
- Add per-thread utcb allocation from the kernel
- Add larger register file for standard ipc
- Add long ipc (up to 1Kb)
2009-04-22 14:48:43 +03:00

56 lines
1.0 KiB
C

/*
* Copyright (C) 2008 Bahadir Balban
*/
#ifndef __FS0_TASK_H__
#define __FS0_TASK_H__
#include <lib/idpool.h>
#include <l4/lib/list.h>
#include <l4/api/kip.h>
#define __TASKNAME__ __VFSNAME__
#define TCB_NO_SHARING 0
#define TCB_SHARED_VM (1 << 0)
#define TCB_SHARED_FILES (1 << 1)
#define TCB_SHARED_FS (1 << 2)
#define TASK_FILES_MAX 32
struct task_fd_head {
int fd[TASK_FILES_MAX];
struct id_pool *fdpool;
int tcb_refs;
};
struct task_fs_data {
struct vnode *curdir;
struct vnode *rootdir;
int tcb_refs;
};
/* Thread control block, fs0 portion */
struct tcb {
l4id_t tid;
struct list_head list;
unsigned long shpage_address;
struct task_fd_head *files;
struct task_fs_data *fs_data;
};
/* Structures used when receiving new task info from pager */
struct task_data {
unsigned long tid;
unsigned long shpage_address;
};
struct task_data_head {
unsigned long total;
struct task_data tdata[];
};
struct tcb *find_task(int tid);
int init_task_data(void);
#endif /* __FS0_TASK_H__ */