sel4: startup lib reinit support

required for noux

Issue #2044
This commit is contained in:
Alexander Boettcher 2016-07-18 11:04:42 +02:00 committed by Christian Helmuth
parent c4c7979163
commit 198475b6b3
3 changed files with 22 additions and 4 deletions

View File

@ -60,6 +60,22 @@ static unsigned &rcv_sel()
}
/*****************************
** Startup library support **
*****************************/
void prepare_reinit_main_thread()
{
/**
* Reset selector to invalid, so that a new fresh will be allocated.
* The IPC buffer of the thread must be configured to point to the
* receive selector which is done by Capability_space::alloc_rcv_sel(),
* which finally calls seL4_SetCapReceivePath();
*/
rcv_sel() = 0;
}
/**
* Convert Genode::Msgbuf_base content into seL4 message
*

View File

@ -25,8 +25,6 @@
void prepare_init_main_thread() { }
void prepare_reinit_main_thread() { prepare_init_main_thread(); }
/************
** Thread **

View File

@ -13,12 +13,16 @@
/* Genode includes */
#include <base/thread.h>
#include <base/printf.h>
#include <base/sleep.h>
#include <base/internal/native_thread.h>
using namespace Genode;
void Thread::_init_platform_thread(size_t, Type type)
{
/**
* Reset to default values. The default values trigger initial allocations
* and associations the thread, like IPCbuffer in ipc.cc.
*/
native_thread() = Native_thread();
}