Revert "Core: exit with child exit value"

Not actually useful, and causes a null deference on NOVA.
This commit is contained in:
Ehmry - 2020-01-22 16:58:21 +01:00
parent 4287419392
commit b20ca5f254
17 changed files with 22 additions and 44 deletions

View File

@ -167,7 +167,7 @@ namespace Genode {
size_t max_caps() const override { return Capability_space::max_caps(); }
void wait_for_exit(int const &) override;
void wait_for_exit() override;
};
}

View File

@ -483,7 +483,7 @@ Platform::Platform() :
** Generic platform interface **
********************************/
void Platform::wait_for_exit(int const &)
void Platform::wait_for_exit()
{
/*
* On Fiasco, Core never exits. So let us sleep forever.

View File

@ -183,7 +183,7 @@ namespace Genode {
Cap_id_allocator &cap_id_alloc() { return _cap_id_alloc; }
void wait_for_exit(int const &) override;
void wait_for_exit() override;
};
}

View File

@ -582,7 +582,7 @@ Platform::Platform() :
** Generic platform interface **
********************************/
void Platform::wait_for_exit(int const &)
void Platform::wait_for_exit()
{
/*
* On Fiasco, Core never exits. So let us sleep forever.

View File

@ -128,7 +128,7 @@ class Genode::Platform : public Genode::Platform_generic
size_t vm_size() const override { return Hw::Mm::user().size; }
Rom_fs &rom_fs() override { return _rom_fs; }
void wait_for_exit(int const &) override {
void wait_for_exit() override {
while (1) { Kernel::stop_thread(); } };
bool supports_direct_unmap() const override { return true; }

View File

@ -129,9 +129,7 @@ namespace Genode {
*/
size_t max_caps() const override { return 10000; }
void wait_for_exit(int const &) override;
void child_exit() override;
void wait_for_exit() override;
};
}

View File

@ -113,7 +113,7 @@ Platform::Platform()
}
void Platform::wait_for_exit(int const &exit_value)
void Platform::wait_for_exit()
{
for (;;) {
@ -145,11 +145,9 @@ void Platform::wait_for_exit(int const &exit_value)
Platform_thread::submit_exception(pid);
}
}
lx_exit_group(exit_value);
lx_exit_group(0);
}
void Platform::child_exit() { sigint_handler(0); }
/*****************************
** Support for IPC library **

View File

@ -82,7 +82,7 @@ namespace Genode {
size_t vm_size() const override { return _vm_size; }
Rom_fs &rom_fs() override { return _rom_fs; }
size_t max_caps() const override { return _max_caps; }
void wait_for_exit(int const &) override;
void wait_for_exit() override;
bool supports_direct_unmap() const override { return true; }

View File

@ -990,5 +990,5 @@ bool Mapped_mem_allocator::_unmap_local(addr_t virt_addr, addr_t, unsigned size)
** Generic platform interface **
********************************/
void Platform::wait_for_exit(int const &) { sleep_forever(); }
void Platform::wait_for_exit() { sleep_forever(); }

View File

@ -139,7 +139,7 @@ namespace Genode {
Rom_fs &rom_fs() override { return _rom_fs; }
size_t max_caps() const override { return Capability_space::max_caps(); }
void wait_for_exit(int const &) override;
void wait_for_exit() override;
bool supports_direct_unmap() const override { return true; }

View File

@ -215,7 +215,7 @@ Platform::Platform()
** Generic platform interface **
********************************/
void Platform::wait_for_exit(int const &)
void Platform::wait_for_exit()
{
/*
* On OKL4, core never exits. So let us sleep forever.

View File

@ -153,7 +153,7 @@ namespace Genode {
Rom_fs &rom_fs() override { return _rom_fs; }
size_t max_caps() const override { return Capability_space::max_caps(); }
void wait_for_exit(int const &) override;
void wait_for_exit() override;
Affinity::Space affinity_space() const override
{

View File

@ -640,7 +640,7 @@ Platform::Platform()
** Generic platform interface **
********************************/
void Platform::wait_for_exit(int const &)
void Platform::wait_for_exit()
{
/*
* On Pistachio, core never exits. So let us sleep forever.

View File

@ -274,7 +274,7 @@ class Genode::Platform : public Platform_generic
Cap_sel asid_pool() const { return _asid_pool_sel; }
void wait_for_exit(int const &) override;
void wait_for_exit() override;
/**
* Determine size of a core local mapping required for a

View File

@ -661,7 +661,7 @@ void Platform::reset_sel(unsigned sel)
}
void Platform::wait_for_exit(int const &)
void Platform::wait_for_exit()
{
sleep_forever();
}

View File

@ -77,12 +77,7 @@ namespace Genode {
/**
* Wait for exit condition
*/
virtual void wait_for_exit(int const &exit_value) = 0;
/**
* Handle exit of child
*/
virtual void child_exit() { };
virtual void wait_for_exit() = 0;
/**
* Return true if platform supports direct unmap (no mapping db)

View File

@ -119,8 +119,6 @@ class Core_child : public Child_policy
Child _child;
int &_exit_value;
public:
/**
@ -130,16 +128,14 @@ class Core_child : public Child_policy
Pd_session &core_pd, Capability<Pd_session> core_pd_cap,
Cpu_session &core_cpu, Capability<Cpu_session> core_cpu_cap,
Cap_quota cap_quota, Ram_quota ram_quota,
Rpc_entrypoint &ep,
int &exit_value)
Rpc_entrypoint &ep)
:
_services(services),
_core_pd_cap (core_pd_cap), _core_pd (core_pd),
_core_cpu_cap(core_cpu_cap), _core_cpu(core_cpu),
_cap_quota(Child::effective_quota(cap_quota)),
_ram_quota(Child::effective_quota(ram_quota)),
_child(local_rm, ep, *this),
_exit_value(exit_value)
_child(local_rm, ep, *this)
{ }
@ -178,13 +174,6 @@ class Core_child : public Child_policy
_core_cpu.transfer_quota(cap, Cpu_session::quota_lim_upscale(100, 100));
}
void exit(int exit_value) override
{
_exit_value = exit_value;
Child_policy::exit(exit_value);
platform().child_exit();
}
Pd_session &ref_pd() override { return _core_pd; }
Pd_session_capability ref_pd_cap() const override { return _core_pd_cap; }
@ -232,8 +221,6 @@ namespace Genode {
int main()
{
static int exit_value { 0 };
/**
* Disable tracing within core because it is currently not fully implemented.
*/
@ -322,10 +309,10 @@ int main()
static Reconstructible<Core_child>
init(services, local_rm, core_pd, core_pd_cap, core_cpu, core_cpu_cap,
init_cap_quota, init_ram_quota, ep, exit_value);
init_cap_quota, init_ram_quota, ep);
platform().wait_for_exit(exit_value);
platform().wait_for_exit();
init.destruct();
return exit_value;
return 0;
}