mirror of
https://github.com/genodelabs/genode.git
synced 2025-06-17 22:58:26 +00:00
Move server API concept to base framework
This commit introduces the new `Component` interface in the form of the headers base/component.h and base/entrypoint.h. The os/server.h API has become merely a compatibilty wrapper and will eventually be removed. The same holds true for os/signal_rpc_dispatcher.h. The mechanism has moved to base/signal.h and is now called 'Signal_handler'. Since the patch shuffles headers around, please do a 'make clean' in the build directory. Issue #1832
This commit is contained in:
committed by
Christian Helmuth
parent
4ac7127f89
commit
051e84c4b4
@ -16,6 +16,7 @@
|
||||
#include <base/env.h>
|
||||
#include <base/native_env.h>
|
||||
|
||||
|
||||
void Genode::upgrade_pd_session_quota(Genode::size_t quota)
|
||||
{
|
||||
char buf[128];
|
||||
|
@ -26,12 +26,25 @@
|
||||
|
||||
using namespace Genode;
|
||||
|
||||
|
||||
namespace Genode {
|
||||
|
||||
/*
|
||||
* On base-hw, no signal thread is needed.
|
||||
*/
|
||||
void init_signal_thread() __attribute__((weak));
|
||||
void init_signal_thread() { }
|
||||
void destroy_signal_thread() { }
|
||||
}
|
||||
|
||||
|
||||
/********************
|
||||
** Signal context **
|
||||
********************/
|
||||
|
||||
void Signal_context::submit(unsigned) { PERR("not implemented"); }
|
||||
|
||||
|
||||
/************************
|
||||
** Signal transmitter **
|
||||
************************/
|
||||
|
@ -24,7 +24,7 @@
|
||||
|
||||
using namespace Genode;
|
||||
|
||||
namespace Genode { Rm_session * env_stack_area_rm_session(); }
|
||||
namespace Genode { extern Rm_session * const env_stack_area_rm_session; }
|
||||
|
||||
namespace Hw {
|
||||
extern Ram_dataspace_capability _main_thread_utcb_ds;
|
||||
@ -51,7 +51,7 @@ void Thread_base::_init_platform_thread(size_t weight, Type type)
|
||||
size_t const utcb_size = sizeof(Native_utcb);
|
||||
addr_t const stack_area = stack_area_virtual_base();
|
||||
addr_t const utcb_new = (addr_t)&_stack->utcb() - stack_area;
|
||||
Rm_session * const rm = env_stack_area_rm_session();
|
||||
Rm_session * const rm = env_stack_area_rm_session;
|
||||
|
||||
if (type == REINITIALIZED_MAIN) { rm->detach(utcb_new); }
|
||||
|
||||
@ -78,7 +78,7 @@ void Thread_base::_deinit_platform_thread()
|
||||
size_t const size = sizeof(_stack->utcb());
|
||||
addr_t utcb = Stack_allocator::addr_to_base(_stack) +
|
||||
stack_virtual_size() - size - stack_area_virtual_base();
|
||||
env_stack_area_rm_session()->detach(utcb);
|
||||
env_stack_area_rm_session->detach(utcb);
|
||||
|
||||
if (_pager_cap.valid()) {
|
||||
env()->rm_session()->remove_client(_pager_cap);
|
||||
@ -101,7 +101,7 @@ void Thread_base::start()
|
||||
size_t const size = sizeof(_stack->utcb());
|
||||
addr_t dst = Stack_allocator::addr_to_base(_stack) +
|
||||
stack_virtual_size() - size - stack_area_virtual_base();
|
||||
env_stack_area_rm_session()->attach_at(ds, dst, size);
|
||||
env_stack_area_rm_session->attach_at(ds, dst, size);
|
||||
} catch (...) {
|
||||
PERR("failed to attach userland stack");
|
||||
sleep_forever();
|
||||
|
Reference in New Issue
Block a user