summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorAllan Stephens <allan.stephens@windriver.com>2016-10-07 13:59:23 -0500
committerAnas Nashif <nashif@linux.intel.com>2016-10-25 00:10:34 +0000
commit904cf972632de023cedc49e801c4c071cc35f79d (patch)
treefc75eb2f7b7d51d791628653a98179b52587f6d4 /include
parent06aefdb6542bb478e76f6670859fcd72ae2fee46 (diff)
unified: Eliminate thread config structure used by work queues
Reworks k_work_q_start() so that it accepts its 3 configuration settings directly, rather than forcing the caller to pass in a configuration data structure. Change-Id: Ic0bd1b94f1a1c8e0f8a84b3bd3677d59d0708734 Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
Diffstat (limited to 'include')
-rw-r--r--include/kernel.h10
-rw-r--r--include/legacy.h6
2 files changed, 7 insertions, 9 deletions
diff --git a/include/kernel.h b/include/kernel.h
index ca83e5814..ee87848e7 100644
--- a/include/kernel.h
+++ b/include/kernel.h
@@ -102,12 +102,6 @@ enum execution_context_types {
K_PREEMPT_THREAD,
};
-struct k_thread_config {
- char *stack;
- unsigned stack_size;
- unsigned prio;
-};
-
typedef void (*k_thread_entry_t)(void *p1, void *p2, void *p3);
extern k_tid_t k_thread_spawn(char *stack, unsigned stack_size,
void (*entry)(void *, void *, void*),
@@ -661,8 +655,8 @@ static inline int k_work_pending(struct k_work *work)
* @brief Start a new workqueue. This routine can be called from either
* fiber or task context.
*/
-extern void k_work_q_start(struct k_work_q *work_q,
- const struct k_thread_config *config);
+extern void k_work_q_start(struct k_work_q *work_q, char *stack,
+ unsigned stack_size, unsigned prio);
#if defined(CONFIG_SYS_CLOCK_EXISTS)
diff --git a/include/legacy.h b/include/legacy.h
index 6e9a129b8..6f1cc51cf 100644
--- a/include/legacy.h
+++ b/include/legacy.h
@@ -107,7 +107,11 @@ static inline nano_thread_id_t fiber_start(char *stack, unsigned stack_size,
#define fiber_fiber_start fiber_start
#define task_fiber_start fiber_start
-#define fiber_config k_thread_config
+struct fiber_config {
+ char *stack;
+ unsigned stack_size;
+ unsigned prio;
+};
#define fiber_start_config(config, entry, arg1, arg2, options) \
fiber_start(config->stack, config->stack_size, \