mirror of
https://github.com/mmueller41/genode.git
synced 2026-01-21 20:42:56 +01:00
base: apply thread.cc fix of foc to base*
With commit 1389b63050 in thread.cc for base-foc
a bug was fixed, where the memory of the context got freed up before running
the de-constructor.
Apply the fix also to base and base-mb.
This commit is contained in:
committed by
Norman Feske
parent
1211516c08
commit
68156918ee
@@ -164,9 +164,9 @@ void Thread_base::_free_context()
|
||||
{
|
||||
addr_t ds_addr = _context->stack_base - Native_config::context_area_virtual_base();
|
||||
Ram_dataspace_capability ds_cap = _context->ds_cap;
|
||||
_context_allocator()->free(this);
|
||||
Genode::env_context_area_rm_session()->detach((void *)ds_addr);
|
||||
Genode::env_context_area_ram_session()->free(ds_cap);
|
||||
_context_allocator()->free(this);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -161,12 +161,11 @@ Thread_base::Context *Thread_base::_alloc_context(size_t stack_size)
|
||||
|
||||
void Thread_base::_free_context()
|
||||
{
|
||||
addr_t ds_addr = _context->stack_base -
|
||||
Native_config::context_area_virtual_base();
|
||||
addr_t ds_addr = _context->stack_base - Native_config::context_area_virtual_base();
|
||||
Ram_dataspace_capability ds_cap = _context->ds_cap;
|
||||
_context_allocator()->free(this);
|
||||
Genode::env_context_area_rm_session()->detach((void *)ds_addr);
|
||||
Genode::env_context_area_ram_session()->free(ds_cap);
|
||||
_context_allocator()->free(this);
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user