-
Notifications
You must be signed in to change notification settings - Fork 7.4k
pthread: facilitate dynamically allocated thread stacks #31603
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
pthread: facilitate dynamically allocated thread stacks #31603
Conversation
Had to recreate this PR from #29029 due to some repo issues in my fork. |
8ed4bf4
to
f46d695
Compare
0df325f
to
286714e
Compare
This change allows users to call pthread_create(3) with the pthread_attr_t argument equal to NULL, or with the pthread_attr_t argument specifying a NULL stack but a custom stack size. If either of the above to requirements are met, then a stack will be heap-allocated internally and freed again after the thread has terminated. This makes the Zephyr implementation of pthread_create(3) more compliant with the normative spec. Fixes zephyrproject-rtos#25973 Signed-off-by: Christopher Friedt <[email protected]>
Tests for dynamically allocated POSIX thread stacks. Fixes zephyrproject-rtos#25973 Signed-off-by: Christopher Friedt <[email protected]>
286714e
to
77d9292
Compare
This pull request has been marked as stale because it has been open (more than) 60 days with no activity. Remove the stale label or add a comment saying that you would like to have the label removed otherwise this pull request will automatically be closed in 14 days. Note, that you can always re-open a closed pull request at any time. |
Still working on an item that this depends on. Has to do with treating user thread stacks as dynamic objects to avoid triggering the mmu / mpu. |
This pull request has been marked as stale because it has been open (more than) 60 days with no activity. Remove the stale label or add a comment saying that you would like to have the label removed otherwise this pull request will automatically be closed in 14 days. Note, that you can always re-open a closed pull request at any time. |
This pull request has been marked as stale because it has been open (more than) 60 days with no activity. Remove the stale label or add a comment saying that you would like to have the label removed otherwise this pull request will automatically be closed in 14 days. Note, that you can always re-open a closed pull request at any time. |
This change allows users to call
pthread_create(3)
with thepthread_attr_t
argument equal toNULL
, or with thepthread_attr_t
argument specifying aNULL
stack.If either of the above to requirements are met, then a stack will be heap-allocated internally and freed again after the thread has terminated.
This helps the Zephyr implementation of
pthread_create(3)
become more compliant with the normative spec.Fixes #25973