mirror of
https://github.com/drasko/codezero.git
synced 2026-02-28 01:33:13 +01:00
Ongoing work for adding per-thread UTCB structures.
Added setting of utcb address to l4_thread_control. This is going to be moved to exchange_registers() since we need to pass both the utcb physical and virtual address and exregs fits such context modification better than thread_control.
This commit is contained in:
@@ -12,7 +12,7 @@
|
||||
#include <l4lib/utcb.h>
|
||||
#include <l4/macros.h>
|
||||
#include INC_GLUE(memory.h)
|
||||
#include <posix_init.h>
|
||||
#include <shpage.h>
|
||||
|
||||
static inline int l4_fork(void)
|
||||
{
|
||||
@@ -43,10 +43,10 @@ int fork(void)
|
||||
|
||||
/*
|
||||
* If we're a child, we need to initialise the default
|
||||
* shared page via posix_init()
|
||||
* shared page via libposix_init()
|
||||
*/
|
||||
if (ret == 0)
|
||||
posix_init();
|
||||
shared_page_init();
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
#ifndef __POSIX_INIT_H__
|
||||
#define __POSIX_INIT_H__
|
||||
#ifndef __LIBPOSIX_INIT_H__
|
||||
#define __LIBPOSIX_INIT_H__
|
||||
|
||||
void posix_init(void);
|
||||
void libposix_init(void);
|
||||
void posix_service_init(void);
|
||||
|
||||
#endif /* __POSIX_INIT_H__ */
|
||||
#endif /* __LIBPOSIX_INIT_H__ */
|
||||
|
||||
@@ -3,28 +3,20 @@
|
||||
*
|
||||
* Copyright (C) 2007-2009 Bahadir Balban
|
||||
*/
|
||||
|
||||
#include <shpage.h>
|
||||
#include <posix_init.h>
|
||||
|
||||
void posix_init(void)
|
||||
void posix_service_init(void)
|
||||
{
|
||||
/* Non-pager tasks initialise their shared communication page */
|
||||
if (self_tid() != PAGER_TID)
|
||||
shared_page_init();
|
||||
BUG_ON(self_tid() != VFS_TID);
|
||||
shared_page_init();
|
||||
}
|
||||
|
||||
int main(void);
|
||||
|
||||
/*
|
||||
* Entry point for posix services container.
|
||||
*
|
||||
* This is executed by all posix system services and tasks
|
||||
* that run in this container.
|
||||
*/
|
||||
void __container_init(void)
|
||||
void libposix_init(void)
|
||||
{
|
||||
posix_init();
|
||||
main();
|
||||
/* Shall only be run by posix applications */
|
||||
BUG_ON(self_tid() == PAGER_TID || self_tid() == VFS_TID);
|
||||
shared_page_init();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user