mirror of
https://github.com/drasko/codezero.git
synced 2026-02-28 09:43:14 +01:00
Added ipc to notify vfs about a forked child.
TODO: Need to ensure child shmat()s its own utcb after a fork (possibly in libposix/fork.c)
This commit is contained in:
@@ -8,6 +8,14 @@ struct id_pool {
|
||||
u32 bitmap[];
|
||||
};
|
||||
|
||||
/* Copy one id pool to another by calculating its size */
|
||||
static inline void id_pool_copy(struct idpool *to, struct idpool *from, int totalbits)
|
||||
{
|
||||
int nwords = BITWISE_GETWORD(totalbits);
|
||||
|
||||
memcpy(to, from, nwords * SZ_WORD + sizeof(struct id_pool));
|
||||
}
|
||||
|
||||
struct id_pool *id_pool_new_init(int mapsize);
|
||||
int id_new(struct id_pool *pool);
|
||||
int id_del(struct id_pool *pool, int id);
|
||||
|
||||
@@ -24,6 +24,17 @@ struct tcb {
|
||||
struct vnode *rootdir;
|
||||
};
|
||||
|
||||
/* Structures used when receiving new task info from pager */
|
||||
struct task_data {
|
||||
unsigned long tid;
|
||||
unsigned long utcb_address;
|
||||
};
|
||||
|
||||
struct task_data_head {
|
||||
unsigned long total;
|
||||
struct task_data tdata[];
|
||||
};
|
||||
|
||||
static inline int task_is_utcb_mapped(struct tcb *t)
|
||||
{
|
||||
return t->utcb_mapped;
|
||||
|
||||
Reference in New Issue
Block a user