summaryrefslogtreecommitdiff
path: root/nuttx/arch/avr/src
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/avr/src
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/avr/src')
-rw-r--r--nuttx/arch/avr/src/avr/up_createstack.c6
-rw-r--r--nuttx/arch/avr/src/avr/up_usestack.c2
-rw-r--r--nuttx/arch/avr/src/avr32/up_createstack.c6
-rw-r--r--nuttx/arch/avr/src/avr32/up_usestack.c2
-rw-r--r--nuttx/arch/avr/src/common/up_releasestack.c2
5 files changed, 9 insertions, 9 deletions
diff --git a/nuttx/arch/avr/src/avr/up_createstack.c b/nuttx/arch/avr/src/avr/up_createstack.c
index aed449f82..1eb56f918 100644
--- a/nuttx/arch/avr/src/avr/up_createstack.c
+++ b/nuttx/arch/avr/src/avr/up_createstack.c
@@ -95,7 +95,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;
}
@@ -108,9 +108,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 = (FAR void *)kzalloc(stack_size);
+ tcb->stack_alloc_ptr = (FAR void *)kuzalloc(stack_size);
#else
- tcb->stack_alloc_ptr = (FAR void *)kmalloc(stack_size);
+ tcb->stack_alloc_ptr = (FAR void *)kumalloc(stack_size);
#endif
#ifdef CONFIG_DEBUG
if (!tcb->stack_alloc_ptr)
diff --git a/nuttx/arch/avr/src/avr/up_usestack.c b/nuttx/arch/avr/src/avr/up_usestack.c
index cd93f5d23..22bdcf84e 100644
--- a/nuttx/arch/avr/src/avr/up_usestack.c
+++ b/nuttx/arch/avr/src/avr/up_usestack.c
@@ -92,7 +92,7 @@ int up_use_stack(struct tcb_s *tcb, void *stack, size_t stack_size)
{
/* Yes.. free it */
- sched_free(tcb->stack_alloc_ptr);
+ sched_ufree(tcb->stack_alloc_ptr);
}
/* Save the stack allocation */
diff --git a/nuttx/arch/avr/src/avr32/up_createstack.c b/nuttx/arch/avr/src/avr32/up_createstack.c
index bfe87743f..5d49f4977 100644
--- a/nuttx/arch/avr/src/avr32/up_createstack.c
+++ b/nuttx/arch/avr/src/avr32/up_createstack.c
@@ -94,7 +94,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;
}
@@ -107,9 +107,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 = (FAR void *)kzalloc(stack_size);
+ tcb->stack_alloc_ptr = (FAR void *)kuzalloc(stack_size);
#else
- tcb->stack_alloc_ptr = (FAR void *)kmalloc(stack_size);
+ tcb->stack_alloc_ptr = (FAR void *)kumalloc(stack_size);
#endif
#ifdef CONFIG_DEBUG
if (!tcb->stack_alloc_ptr)
diff --git a/nuttx/arch/avr/src/avr32/up_usestack.c b/nuttx/arch/avr/src/avr32/up_usestack.c
index 5afadb922..43dc6bfe9 100644
--- a/nuttx/arch/avr/src/avr32/up_usestack.c
+++ b/nuttx/arch/avr/src/avr32/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 */
diff --git a/nuttx/arch/avr/src/common/up_releasestack.c b/nuttx/arch/avr/src/common/up_releasestack.c
index 98b1faea1..afce3261d 100644
--- a/nuttx/arch/avr/src/common/up_releasestack.c
+++ b/nuttx/arch/avr/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;
}