diff options
author | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2020-04-09 12:11:19 +0200 |
---|---|---|
committer | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2020-08-31 17:30:17 +0200 |
commit | aedd92d1477df0025821b77c06b2f2b2dc7aaf67 (patch) | |
tree | 42c71c8c52678d2a986d53cc9a39e60e55e93251 /cpukit/posix/src/pthreadcreate.c | |
parent | score: Move _Stack_Allocator_free to separate file (diff) | |
download | rtems-aedd92d1477df0025821b77c06b2f2b2dc7aaf67.tar.bz2 |
score: Add stack free handler to TCB
This avoids a dependency to the stack free function in the thread
destruction.
Update #3959.
Diffstat (limited to 'cpukit/posix/src/pthreadcreate.c')
-rw-r--r-- | cpukit/posix/src/pthreadcreate.c | 4 |
1 files changed, 3 insertions, 1 deletions
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 ); |