kernel: mem_domain: Add arch specfic destroy for remove thread API.
If the thread id is same as current then handle the cleanup of the memory domain. Signed-off-by: Adithya Baglody <adithya.nagaraj.baglody@intel.com>
This commit is contained in:
parent
ba0b2836e8
commit
e1f4a002f3
1 changed files with 3 additions and 0 deletions
|
@ -168,6 +168,9 @@ void k_mem_domain_remove_thread(k_tid_t thread)
|
|||
__ASSERT(thread && thread->mem_domain_info.mem_domain, "");
|
||||
|
||||
key = irq_lock();
|
||||
if (_current == thread) {
|
||||
_arch_mem_domain_destroy(thread->mem_domain_info.mem_domain);
|
||||
}
|
||||
|
||||
sys_dlist_remove(&thread->mem_domain_info.mem_domain_q_node);
|
||||
thread->mem_domain_info.mem_domain = NULL;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue