kernel: mem_domain: k_mem_domain_add_thread to return errors

This updates k_mem_domain_add_thread() to return errors so
the application has a chance to recover.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
This commit is contained in:
Daniel Leung 2021-11-12 16:10:10 -08:00 committed by Anas Nashif
commit a60317167b
2 changed files with 45 additions and 15 deletions

View file

@ -183,9 +183,10 @@ extern int k_mem_domain_remove_partition(struct k_mem_domain *domain,
* @param domain The memory domain that the thread is going to be added into.
* @param thread ID of thread going to be added into the memory domain.
*
* @return 0 if successful, fails otherwise.
*/
extern void k_mem_domain_add_thread(struct k_mem_domain *domain,
k_tid_t thread);
extern int k_mem_domain_add_thread(struct k_mem_domain *domain,
k_tid_t thread);
#ifdef __cplusplus
}