Repository navigation
Conversation
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
791d71f to
3201966
Compare
|
This PR depends on a newer version of the |
This comment has been minimized.
This comment has been minimized.
You need |
|
@rustbot author |
|
Reminder, once the PR becomes ready for a review, use |
The commit I need - rust-lang/libc@9934c04 is not yet tagged/released. Or rather there is a |
This comment has been minimized.
This comment has been minimized.
3201966 to
5adcafb
Compare
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Ah - I see now that it appears in |
This comment has been minimized.
This comment has been minimized.
5adcafb to
caab9c9
Compare
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
caab9c9 to
3749f50
Compare
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
831243f to
a61647f
Compare
|
This PR was rebased onto a different main commit. Here's a range-diff highlighting what actually changed. Rebasing is a normal part of keeping PRs up to date, so no action is needed—this note is just to help reviewers. |
There was a problem hiding this comment.
Sorry for taking so long to respond. Unfortunately, the change is so large that it's really hard to keep track of everything; and I want to make sure we get it right, especially the public API changes. We've added support for some other targets incrementally in the past, but I'm not sure if that's sensible at this point. Anyway, here's a quick pass...
|
|
||
| #[cfg(target_os = "qurt")] | ||
| pub unsafe fn unsetenv(_n: &OsStr) -> io::Result<()> { | ||
| panic!("remove_var is not supported on this platform") |
There was a problem hiding this comment.
I think it'd be better to return io::Error::UNSUPPORTED_PLATFORM here, the panic message in remove_env is a bit nicer.
There was a problem hiding this comment.
Returned Err(io::Error::UNSUPPORTED_PLATFORM) instead.
| all(not(target_thread_local), target_vendor = "apple"), | ||
| target_os = "qurt", | ||
| target_os = "teeos", | ||
| target_os = "qurt", |
| } | ||
| } | ||
|
|
||
| #[allow(dead_code)] // Not used on all platforms. |
There was a problem hiding this comment.
You are right. #[allow(dead_code)] was unnecessary here.
No worries at all. I understand this is a big change and it's in everyone's best interest that it is done right. Thank you for all the feedback. |
|
@rustbot ready |
|
☔ The latest upstream changes made this pull request unmergeable. Please resolve the merge conflicts by rebasing. |
| debug_assert_eq!(ret, 0); | ||
| #[cfg(not(target_os = "qurt"))] | ||
| { | ||
| let ret = unsafe { libc::sched_yield() }; |
There was a problem hiding this comment.
It looks like QuRT defines a sched_yield symbol? Or am I missing something.
There was a problem hiding this comment.
The repository you have linked to is the hexagon-hypervisor (colloquially h2), which is separate from QuRT. Catering for it would be a new hexagon-unknown-h2 target rather than a hexagon-unknown-qurt thing. QuRT is what the public Hexagon SDK currently ships with and defines sched_yield as:
static inline int sched_yield(void)
So it is never exported as a linkable symbol. More details are noted in the rust-lang/libc crate at src/new/qurt/sys/sched.rs:21-24.
If you wish to independently verify sched_yield's static inline qualifiers for QuRT, you may use the following one-liner shell command for your convenience:
curl -L -o /tmp/hexagon_sdk.zip "https://softwarecenter.qualcomm.com/api/download/software/sdks/Hexagon_SDK/Windows/6.7.0.0/Hexagon_SDK_WinNT_6.7.0.zip" && unzip -p /tmp/hexagon_sdk.zip '*posix/sys/sched.h' | grep -A3 sched_yield
| #[path = "../unix/stack_overflow/mod.rs"] | ||
| pub mod stack_overflow; |
There was a problem hiding this comment.
Just a heads-up that this will be made unnecessary by #166389.
| @@ -0,0 +1,21 @@ | |||
| //! QuRT-specific definitions. | |||
|
|
|||
| #![stable(feature = "raw_ext", since = "1.1.0")] | |||
There was a problem hiding this comment.
Please leave these as unstable for now, that would make me a bit more relaxed about merging this without having to hold a FCP.
| } | ||
|
|
||
| #[cfg(not(target_os = "trusty"))] | ||
| #[cfg(not(any(target_os = "qurt", target_os = "trusty")))] |
There was a problem hiding this comment.
This shouldn't apply to File, should it?
There was a problem hiding this comment.
Could you rebase this on top of #166395? That should make this more trivial.
View all comments
QuRT is not a unix target but provides POSIX-compatible threading, file I/O, and synchronization APIs. This implementation does not declare unix as a target family. Instead, it explicitly opts into the unix PAL and selects unix-based implementations for individual subsystems where QuRT's POSIX layer is sufficient.
Supported: alloc, threading, mutex, condvar, rwlock, once, thread parking, TLS, file system, file descriptors, stdio, I/O slices, I/O errors, is_terminal, env, paths, time, exit, personality/unwinding, backtrace
Stubbed; returns Err: process spawning, networking, pipes, hostname
Stubbed; returns empty: command-line args
Stubbed; panics: random
Platform modules: