sys: util: Added separator to FOR_EACH_ macros

Added separator (e.g. comma or semicolon) parameter to FOR_EACH_ family.
Separator is added between macro execution for each argument and not at
the end.

Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
This commit is contained in:
Krzysztof Chruscinski 2020-05-08 07:06:58 +02:00 committed by Carles Cufí
commit 1b4b9386e5
8 changed files with 56 additions and 46 deletions

View file

@ -830,7 +830,7 @@ extern FUNC_NORETURN void k_thread_user_mode_enter(k_thread_entry_t entry,
* @param ... list of kernel object pointers
*/
#define k_thread_access_grant(thread, ...) \
FOR_EACH_FIXED_ARG(k_object_access_grant, thread, __VA_ARGS__)
FOR_EACH_FIXED_ARG(k_object_access_grant, (;), thread, __VA_ARGS__)
/**
* @brief Assign a resource memory pool to a thread