-
Notifications
You must be signed in to change notification settings - Fork 7.6k
cpp: thread: support for std::thread, std::mutex, std::condition_variable, etc #43729
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
base: main
Are you sure you want to change the base?
cpp: thread: support for std::thread, std::mutex, std::condition_variable, etc #43729
Conversation
7e0911f
to
597f1c9
Compare
The toolchain header
The file
|
48ebd02
to
9b19892
Compare
c7f071a
to
b5f0b91
Compare
@cfriedt is there any reason why this pull-req is not progressing forward? I'm also very interested in getting better C++ support into Zephyr and would like to help out. Is there any specific I can help out with here? I've tested this PR with the SDK changes mentioned above and my 5-min test says it works fine. |
@ortogonal
|
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 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. |
Hi @AfflatusX - There is a known issue and fix, documented here zephyrproject-rtos/sdk-ng#751 I'm not sure what release this will be integrated into in the Zephyr SDK. @stephanosio is the C++ maintainer and SDK maintainer, and might have a better idea. |
@cfriedt - Thanks for the quick reply! I can fork/patch your PR in the meantime. However, when I pull the v0.16.6 branch and try to build the toolchain using
I tried to search for the message |
I would guess that some changes were reverted in |
my bad, forgot gcc is a sub module, need to update separately. |
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 commit adds support for std::thread and std::this_thread when the configured C++ standard is >= C++11. The implementation uses POSIX threads under the hood. Signed-off-by: Christopher Friedt <[email protected]>
This commit adds tests for std::thread and std::this_thread. Signed-off-by: Christopher Friedt <[email protected]>
Add tests for the ISO C++11 std::condition_variable. Signed-off-by: Christopher Friedt <[email protected]>
Add tests for ISO C++ std::mutex. Signed-off-by: Christopher Friedt <[email protected]>
d97b95b
to
984a65b
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. |
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 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 needs a rebase and re-rev of SDK changes to be made. |
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 commit adds support for
std::thread
andstd::this_thread
when the configured C++ standard is >= C++11.Fixes #25569
Accompanying
sdk-ng
PR: zephyrproject-rtos/sdk-ng#735Notes:
CONFIG_ARCH_POSIX=y
andCONFIG_ARCH_POSIX=n
CONFIG_ARCH_POSIX=n
as we cannot yet auto-allocate thread stacks