unified: Relocate internal thread group APIs

Moves the following internal thread group APIs from the public
kernel.h header file to the more private thread.c source file as
they do not need to be public APIs.
	_k_task_list_start[];
	_k_task_list_end[];
	_FOREACH_STATIC_THREAD()
	is_in_any_group()

Change-Id: I0b731fb0c20a5574cb1b3c1397803af82918d69d
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
This commit is contained in:
Peter Mitsis 2016-09-28 19:18:09 -04:00 committed by Benjamin Walsh
commit 0ca7cea8f3
2 changed files with 14 additions and 12 deletions

View file

@ -1287,19 +1287,7 @@ extern void k_free(void *p);
* private APIs that are utilized by one or more public APIs
*/
extern struct k_thread_static_init _k_task_list_start[];
extern struct k_thread_static_init _k_task_list_end[];
#define _FOREACH_STATIC_THREAD(thread_init) \
for (struct k_thread_static_init *thread_init = _k_task_list_start; \
thread_init < _k_task_list_end; thread_init++)
extern int _is_thread_essential(void);
static inline int is_in_any_group(struct k_thread_static_init *thread_init,
uint32_t groups)
{
return !!(thread_init->init_groups & groups);
}
extern void _init_static_threads(void);
#ifdef __cplusplus

View file

@ -34,6 +34,14 @@
#include <sched.h>
#include <wait_q.h>
extern struct k_thread_static_init _k_task_list_start[];
extern struct k_thread_static_init _k_task_list_end[];
#define _FOREACH_STATIC_THREAD(thread_init) \
for (struct k_thread_static_init *thread_init = _k_task_list_start; \
thread_init < _k_task_list_end; thread_init++)
/* Legacy API */
int sys_execution_context_type_get(void)
@ -306,6 +314,12 @@ int k_thread_cancel(k_tid_t tid)
return 0;
}
static inline int is_in_any_group(struct k_thread_static_init *thread_init,
uint32_t groups)
{
return !!(thread_init->init_groups & groups);
}
void _k_thread_group_op(uint32_t groups, void (*func)(struct tcs *))
{
unsigned int key;