summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorPeter Mitsis <peter.mitsis@windriver.com>2016-10-17 11:48:43 -0400
committerAnas Nashif <nashif@linux.intel.com>2016-10-24 22:58:27 +0000
commit602e6a8ae74c13d3134bde18550e5e9cb6db3c30 (patch)
treea40b39120e9b6e5a9e97a9a738badd27a840c4bf /include
parent12f35f312c81a4a6a2170b30c3f8a18c40de029b (diff)
unfied: Tweak stack API parameters
- Reorders parameters where necessary Change-Id: I0aa659515b71c8f2d6ed7fae47489ddcb10eb69f Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
Diffstat (limited to 'include')
-rw-r--r--include/kernel.h13
1 files changed, 7 insertions, 6 deletions
diff --git a/include/kernel.h b/include/kernel.h
index ed3174879..d083d6db4 100644
--- a/include/kernel.h
+++ b/include/kernel.h
@@ -556,7 +556,7 @@ extern void k_stack_init(struct k_stack *stack,
extern void k_stack_push(struct k_stack *stack, uint32_t data);
extern int k_stack_pop(struct k_stack *stack, uint32_t *data, int32_t timeout);
-#define K_STACK_INITIALIZER(obj, stack_num_entries, stack_buffer) \
+#define K_STACK_INITIALIZER(obj, stack_buffer, stack_num_entries) \
{ \
.wait_q = SYS_DLIST_STATIC_INIT(&obj.wait_q), \
.base = stack_buffer, \
@@ -565,11 +565,12 @@ extern int k_stack_pop(struct k_stack *stack, uint32_t *data, int32_t timeout);
_DEBUG_TRACING_KERNEL_OBJECTS_INIT \
}
-#define K_STACK_DEFINE(name, stack_num_entries) \
- uint32_t __noinit _k_stack_buf_##name[stack_num_entries]; \
- struct k_stack name = \
- K_STACK_INITIALIZER(name, stack_num_entries, \
- _k_stack_buf_##name); \
+#define K_STACK_DEFINE(name, stack_num_entries) \
+ uint32_t __noinit \
+ _k_stack_buf_##name[stack_num_entries]; \
+ struct k_stack name = \
+ K_STACK_INITIALIZER(name, _k_stack_buf_##name, \
+ stack_num_entries)
/**
* workqueues