summaryrefslogtreecommitdiff
path: root/kernel
diff options
context:
space:
mode:
authorAllan Stephens <allan.stephens@windriver.com>2016-10-07 15:13:24 -0500
committerPeter Mitsis <peter.mitsis@windriver.com>2016-10-13 13:54:00 +0000
commit018cd9a65678277834d194a22d62a81c8a50f98b (patch)
treece7cf829b09b2c2896066b873aedff8cc4284c02 /kernel
parent399d0ad55aea6d04f9312a0a8bc45b59fd6a354b (diff)
unified: Eliminate k_stack_init_with_buffer()
Folds this API into k_stack_init() to provide a single API that requires the caller to pass in the stack buffer, just as is done for other kernel objects initialization APIs involving the use of a buffer. Change-Id: Icad5fd6e5387d634738d1574f8dfbc5421cd642d Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
Diffstat (limited to 'kernel')
-rw-r--r--kernel/unified/stack.c8
1 files changed, 1 insertions, 7 deletions
diff --git a/kernel/unified/stack.c b/kernel/unified/stack.c
index 67ded276c..32b5787c2 100644
--- a/kernel/unified/stack.c
+++ b/kernel/unified/stack.c
@@ -27,8 +27,7 @@
#include <wait_q.h>
#include <misc/__assert.h>
-void k_stack_init_with_buffer(struct k_stack *stack, int num_entries,
- uint32_t *buffer)
+void k_stack_init(struct k_stack *stack, uint32_t *buffer, int num_entries)
{
sys_dlist_init(&stack->wait_q);
stack->next = stack->base = buffer;
@@ -37,11 +36,6 @@ void k_stack_init_with_buffer(struct k_stack *stack, int num_entries,
SYS_TRACING_OBJ_INIT(k_stack, stack);
}
-void k_stack_init(struct k_stack *stack, int num_entries)
-{
- k_stack_init_with_buffer(stack, num_entries, (uint32_t *)(stack + 1));
-}
-
void k_stack_push(struct k_stack *stack, uint32_t data)
{
struct k_thread *first_pending_thread;