mirror of
https://github.com/drasko/codezero.git
synced 2026-01-12 10:53:16 +01:00
utcb as a shared page instead of the message registers. Implemented the code that passes task information from mm0 to fs0 using the fs0 utcb. The code seems to work OK but: There's an issue with anon pages that they end up on the same swapfile and with same file offsets (e.g. utcb and stack at offset 0). Need to fix this issue but otherwise this implementation seems to work. TODO: - Separate anon regions into separate vmfiles. - Possibly map the stacks from virtual files so that they can be read from userspace in the future for debugging. - Possibly utcb could be created as a shared memory object using shmget/shmat during startup.
30 lines
539 B
C
30 lines
539 B
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 TASK_OFILES_MAX 32
|
|
|
|
/* Thread control block, fs0 portion */
|
|
struct tcb {
|
|
l4id_t tid;
|
|
unsigned long utcb_address;
|
|
struct list_head list;
|
|
int fd[TASK_OFILES_MAX];
|
|
struct id_pool *fdpool;
|
|
struct vnode *curdir;
|
|
struct vnode *rootdir;
|
|
};
|
|
|
|
struct tcb *find_task(int tid);
|
|
int init_task_data(void);
|
|
|
|
#endif /* __FS0_TASK_H__ */
|