3 ms·
But pthread_cancel isn't exposed in the Rust standard library! It's marked unsafe in libc, as it should be.
by pcwalton 5y ago
But pthread_cancel isn't exposed in the Rust standard library! It's marked unsafe in libc, as it should be.
- pjmlp 5y agoThat is not the reason why it is marked unsafe, rather how the C FFI works on Rust. So now is safety memory safety, or POSIX cross platform semantics safety? Better make your mind what safe actually means in Rust.
- expnkx 5y ago[flagged]
- expnkx 5y ago
- expnkx 5y ago
- expnkx 5y ago
- littlestymaar 5y agothe libc crate exposes functions in Rust, some are safe, others aren't, you don't call the libc crate function through FFI. (The libc crate indeed calls the underlying libc through FFI but this isn't the same thing!)
- expnkx 5y ago
- expnkx 5y ago