Skip to content

Commit 88d27cc

Browse files
pawpawhenashif
authored andcommitted
posix: pthread: correct log info of new stack address
When a new stack is allocated successfully in pthread_attr_setstacksize, the new address should be printed not the original one. Signed-off-by: Paul He <[email protected]>
1 parent 3f59cf9 commit 88d27cc

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/posix/options/pthread.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1250,7 +1250,7 @@ int pthread_attr_setstacksize(pthread_attr_t *_attr, size_t stacksize)
12501250
__get_attr_stacksize(attr) + attr->guardsize);
12511251
return ENOMEM;
12521252
}
1253-
LOG_DBG("Allocated thread stack %zu@%p", stacksize + attr->guardsize, attr->stack);
1253+
LOG_DBG("Allocated thread stack %zu@%p", stacksize + attr->guardsize, new_stack);
12541254

12551255
if (attr->stack != NULL) {
12561256
ret = k_thread_stack_free(attr->stack);

0 commit comments

Comments
 (0)