Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
use_file: Use AtomicI32 instead of AtomicUsize to avoid conversions.
All the targets that use `use_file` support `AtomicI32`. Using `AtomicI32` eliminates `as` conversions and thus avoids any possibility of truncation or confusion between `FD_UNINIT` and a valid file descriptor. Use -1 as the sentinel value for `FD_UNINIT` since libstd (only) guarantees that -1 is not a valid file descriptor value. Minimize the scope of `FD_UNINIT`.
- Loading branch information