-
Notifications
You must be signed in to change notification settings - Fork 187
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 conversio…
…ns (#480) 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
1 parent
15c6be8
commit 480d6b0
Showing
1 changed file
with
14 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters