mirror of
https://github.com/mmueller41/genode.git
synced 2026-01-21 12:32:56 +01:00
committed by
Christian Helmuth
parent
8255053242
commit
bc665384c3
@@ -41,6 +41,13 @@ static inline void * _alloc_stack(const char * name)
|
||||
}
|
||||
|
||||
|
||||
static inline void _free_stack(void *addr)
|
||||
{
|
||||
Genode::Thread * th = Genode::Thread::myself();
|
||||
th->free_secondary_stack(addr);
|
||||
}
|
||||
|
||||
|
||||
Task::State Task::state() const { return _state; }
|
||||
|
||||
|
||||
@@ -152,4 +159,8 @@ Task::Task(int (* func)(void*),
|
||||
}
|
||||
|
||||
|
||||
Task::~Task() { _scheduler.remove(*this); }
|
||||
Task::~Task()
|
||||
{
|
||||
_scheduler.remove(*this);
|
||||
_free_stack(_stack);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user