-
-
Notifications
You must be signed in to change notification settings - Fork 14.2k
Support QNX 7.1 with io-sock+libstd and QNX 8.0 (no_std only)
#133631
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
Conversation
This comment has been minimized.
This comment has been minimized.
96a91e2 to
6116b6a
Compare
This comment has been minimized.
This comment has been minimized.
|
So, first up, excellent! The AWS QNX Neutrino 7.1.0 AMIs appears to use iosock and so I have to keep copying over However, I note that there are currently no five-part-triples in the target list, so this would be the first. Perhaps Will there be a |
This comment was marked as resolved.
This comment was marked as resolved.
Beware that version 3 and 4 have different APIs -- they may seem to work, but there might be subtle issues up to undefined behavior.
Very good idea -- I found it confusing that target_env uses an underscore while the target name does not. I will rename it!
Not planned so far, but should be quite easy to do. How big is the need for it? |
No idea. Who was asking for this target? |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment was marked as resolved.
This comment was marked as resolved.
|
I was thinking to use an obvious dummy value rather than panicking if the environment variable isn't set. But maybe the project people have a better idea. Are there another other targets that need to read environment variables? |
This comment was marked as resolved.
This comment was marked as resolved.
5051c34 to
00079dc
Compare
This comment has been minimized.
This comment has been minimized.
72b6642 to
32310c3
Compare
|
What is the problem with forking many processes? How many is "many"? QNX supports up to 4094 simultaneous processes (procnto takes 1, so that's 4093), each with up to 32K threads. Are you really hitting a limit? |
|
@elahav : Are you referring to the changed comment in file |
|
I was just looking at the description of the MR, which says "As it turned out, the problem with forking many processes still exists in QNX 8.0". I went to the file you mentioned, and the comment is indeed clear. The code was changed in 8.0 to ignore Did you run into the problem, or is it just based on the documentation? If so, it's possible the documentation is out of date. |
|
The problem was reliably reproducible with 7.1 when running the test suite of Rusts stdlib (which forks a lot of processes with high frequency, one process per test case). I never tested that on 8.0 without our workaround. We changed the comment based on the documentation of 8.0. Do you think this should be fixed in 8.0 or could the behavior have change which would require a change in Rusts stdlib? |
|
You can keep the loop if it makes it easier to have common code between 7.1 and 8.0. It should not be needed, but it doesn't do any harm. Note that |
Changes of this pull request:
Refactor code for qnx nto targets to share more code in file
nto_qnx.rsAdd support for an additional network stack on nto qnx 7.1.
QNX 7.1 supports two network stacks:
io-pkt, which is defaultio-sock, which is optional on 7.1 but default in QNX 8.0As one can see in the io-sock migration notes, this changes the libc API in a way similar to e.g. linux-gnu vs. linux-musl.
This change adds a new target which has a different value for
target_env, so that e.g. libc can distinguish between both APIs.Add initial support for QNX 8.0, thanks to AkhilTThomas. As it turned out, the problem with forking many processes still exists in QNX 8.0. Because if this, we are now using it for any QNX version (i.e. not check for
target_envanymore).@rustbot label +O-neutrino
CC: @jonathanpallant @japaric @gh-tr @AkhilTThomas