summaryrefslogtreecommitdiff
path: root/nuttx/arch/sh
diff options
context:
space:
mode:
authorpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2013-03-10 15:32:33 +0000
committerpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2013-03-10 15:32:33 +0000
commit8e0c015c2120bf7d76a0c41d1160a745c3565a50 (patch)
tree60de505ed836f8805b07ead45c2fe36cfc15be6a /nuttx/arch/sh
parentdda5be5c1fc672b5d9cb3a910b5e0cb0a41046c5 (diff)
downloadpx4-nuttx-8e0c015c2120bf7d76a0c41d1160a745c3565a50.tar.gz
px4-nuttx-8e0c015c2120bf7d76a0c41d1160a745c3565a50.tar.bz2
px4-nuttx-8e0c015c2120bf7d76a0c41d1160a745c3565a50.zip
Create sched_ufree and sched_kfree from sched_free; Use user-accessible heap to allocae stacks
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@5725 42af7a65-404d-4744-a932-0658087f49c3
Diffstat (limited to 'nuttx/arch/sh')
-rw-r--r--nuttx/arch/sh/src/common/up_createstack.c6
-rw-r--r--nuttx/arch/sh/src/common/up_releasestack.c2
-rw-r--r--nuttx/arch/sh/src/common/up_usestack.c2
3 files changed, 5 insertions, 5 deletions
diff --git a/nuttx/arch/sh/src/common/up_createstack.c b/nuttx/arch/sh/src/common/up_createstack.c
index 296245a49..9abc05f76 100644
--- a/nuttx/arch/sh/src/common/up_createstack.c
+++ b/nuttx/arch/sh/src/common/up_createstack.c
@@ -91,7 +91,7 @@ int up_create_stack(struct tcb_s *tcb, size_t stack_size)
{
/* Yes.. free it */
- sched_free(tcb->stack_alloc_ptr);
+ sched_ufree(tcb->stack_alloc_ptr);
tcb->stack_alloc_ptr = NULL;
}
@@ -104,9 +104,9 @@ int up_create_stack(struct tcb_s *tcb, size_t stack_size)
*/
#if defined(CONFIG_DEBUG) && !defined(CONFIG_DEBUG_STACK)
- tcb->stack_alloc_ptr = (uint32_t *)kzalloc(stack_size);
+ tcb->stack_alloc_ptr = (uint32_t *)kuzalloc(stack_size);
#else
- tcb->stack_alloc_ptr = (uint32_t *)kmalloc(stack_size);
+ tcb->stack_alloc_ptr = (uint32_t *)kumalloc(stack_size);
#endif
#ifdef CONFIG_DEBUG
if (!tcb->stack_alloc_ptr)
diff --git a/nuttx/arch/sh/src/common/up_releasestack.c b/nuttx/arch/sh/src/common/up_releasestack.c
index 3b4e4c914..a8b9d7769 100644
--- a/nuttx/arch/sh/src/common/up_releasestack.c
+++ b/nuttx/arch/sh/src/common/up_releasestack.c
@@ -71,7 +71,7 @@ void up_release_stack(struct tcb_s *dtcb)
{
if (dtcb->stack_alloc_ptr)
{
- sched_free(dtcb->stack_alloc_ptr);
+ sched_ufree(dtcb->stack_alloc_ptr);
dtcb->stack_alloc_ptr = NULL;
}
diff --git a/nuttx/arch/sh/src/common/up_usestack.c b/nuttx/arch/sh/src/common/up_usestack.c
index ee26cb70c..1cc383a91 100644
--- a/nuttx/arch/sh/src/common/up_usestack.c
+++ b/nuttx/arch/sh/src/common/up_usestack.c
@@ -89,7 +89,7 @@ int up_use_stack(struct tcb_s *tcb, void *stack, size_t stack_size)
if (tcb->stack_alloc_ptr)
{
- sched_free(tcb->stack_alloc_ptr);
+ sched_ufree(tcb->stack_alloc_ptr);
}
/* Save the stack allocation */