From aedd92d1477df0025821b77c06b2f2b2dc7aaf67 Mon Sep 17 00:00:00 2001 From: Sebastian Huber Date: Thu, 9 Apr 2020 12:11:19 +0200 Subject: score: Add stack free handler to TCB This avoids a dependency to the stack free function in the thread destruction. Update #3959. --- cpukit/posix/src/pthreadcreate.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'cpukit/posix') diff --git a/cpukit/posix/src/pthreadcreate.c b/cpukit/posix/src/pthreadcreate.c index d431c64a3e..33c5f8d03a 100644 --- a/cpukit/posix/src/pthreadcreate.c +++ b/cpukit/posix/src/pthreadcreate.c @@ -218,8 +218,10 @@ int pthread_create( } if ( config.stack_area == NULL ) { + config.stack_free = _Stack_Free; config.stack_area = _Stack_Allocate( config.stack_size ); - config.allocated_stack = config.stack_area; + } else { + config.stack_free = _Stack_Free_nothing; } status = ( config.stack_area != NULL ); -- cgit v1.2.3