summaryrefslogtreecommitdiffstats
path: root/cpukit/score/src/threadstackfree.c
diff options
context:
space:
mode:
authorJoel Sherrill <joel.sherrill@OARcorp.com>2009-09-13 21:00:11 +0000
committerJoel Sherrill <joel.sherrill@OARcorp.com>2009-09-13 21:00:11 +0000
commitbacf79e0b981e9e3796fb6e3a9d9b39ed476d60d (patch)
tree149a46b35388ce0a3acfcfdc909f45546e4a7bb8 /cpukit/score/src/threadstackfree.c
parent2009-09-13 Joel Sherrill <joel.sherrill@oarcorp.com> (diff)
downloadrtems-bacf79e0b981e9e3796fb6e3a9d9b39ed476d60d.tar.bz2
2009-09-13 Joel Sherrill <joel.sherrill@oarcorp.com>
* score/include/rtems/score/thread.h, score/src/threadinitialize.c, score/src/threadstackfree.c: Disable capability for API to let user provide thread stack when no API configured includes this capability.
Diffstat (limited to 'cpukit/score/src/threadstackfree.c')
-rw-r--r--cpukit/score/src/threadstackfree.c23
1 files changed, 11 insertions, 12 deletions
diff --git a/cpukit/score/src/threadstackfree.c b/cpukit/score/src/threadstackfree.c
index ba376b8972..beede76793 100644
--- a/cpukit/score/src/threadstackfree.c
+++ b/cpukit/score/src/threadstackfree.c
@@ -41,23 +41,22 @@ void _Thread_Stack_Free(
Thread_Control *the_thread
)
{
+ #if defined(RTEMS_SCORE_THREAD_ENABLE_USER_PROVIDED_STACK_VIA_API)
/*
* If the API provided the stack space, then don't free it.
*/
-
if ( !the_thread->Start.core_allocated_stack )
return;
+ #endif
- /*
- * Call ONLY the CPU table stack free hook, or the
- * the RTEMS workspace free. This is so the free
- * routine properly matches the allocation of the stack.
- */
+ /*
+ * Call ONLY the CPU table stack free hook, or the
+ * the RTEMS workspace free. This is so the free
+ * routine properly matches the allocation of the stack.
+ */
- if ( Configuration.stack_free_hook )
- (*Configuration.stack_free_hook)(
- the_thread->Start.Initial_stack.area
- );
- else
- _Workspace_Free( the_thread->Start.Initial_stack.area );
+ if ( Configuration.stack_free_hook )
+ (*Configuration.stack_free_hook)( the_thread->Start.Initial_stack.area );
+ else
+ _Workspace_Free( the_thread->Start.Initial_stack.area );
}