LinkTed
a91fd7328c
Add doc comments
2020-10-10 15:19:12 +02:00
LinkTed
46764d48bb
Add doc(cfg(...))
2020-10-10 15:19:12 +02:00
LinkTed
1869141e54
Reduce impl trait by using macro in raw_fd.rs
2020-10-10 15:19:12 +02:00
LinkTed
53791b3ff4
Move conditional compilation to the upper module and sort the target OS list alphabetically
2020-10-10 15:19:12 +02:00
LinkTed
07ed6afc6d
Remove unnecessary path
2020-10-10 15:19:12 +02:00
LinkTed
6ed9bface6
Use fill instead of memset
2020-10-10 15:19:12 +02:00
LinkTed
1f3195a5df
Remove inner function in bind, connect and send_to
2020-10-10 15:19:12 +02:00
LinkTed
4c929a00ee
Remove lifetime annotation in messages function
2020-10-10 15:19:12 +02:00
LinkTed
b82f29d780
Remove Clone trait bound in add_to_ancillary_data
2020-10-10 15:19:11 +02:00
LinkTed
3dfab6fb64
Add integer overflow check
2020-10-10 15:19:11 +02:00
LinkTed
e1084052a7
Replace TryFrom of AncillaryData with a private method.
2020-10-10 15:19:11 +02:00
LinkTed
8784ffbb4e
Using read_unaligned instead of memcpy.
2020-10-10 15:19:11 +02:00
LinkTed
8783b06bd2
Move add_to_ancillary_data and AncillaryDataIter to ancillary.rs
2020-10-10 15:19:11 +02:00
LinkTed
e6984eee6f
Add UCred struct
2020-10-10 15:19:11 +02:00
LinkTed
6f82ddf18e
Add AncillaryError
2020-10-10 15:19:11 +02:00
LinkTed
6fa7c3f79e
Split net.rs into multiple files
2020-10-10 15:19:11 +02:00
LinkTed
0b3c9d8465
unix: Extend UnixStream and UnixDatagram to send and receive file descriptors
...
Add the functions `recv_vectored_fds` and `send_vectored_fds` to send and receive file descriptors, by using `recvmsg` and `sendmsg` system call.
2020-10-10 15:19:11 +02:00
bors
7477d445c8
Auto merge of #77717 - tmiasko:posix-spawn-error-check, r=cuviper
...
Fix error checking in posix_spawn implementation of Command
* Check for errors returned from posix_spawn*_init functions
* Check for non-zero return value from posix_spawn functions
2020-10-10 10:59:20 +00:00
Josh Stone
1d06b07765
simplify the cfg in ReadDir construction
...
Co-authored-by: David Tolnay <dtolnay@gmail.com >
2020-10-09 10:54:50 -07:00
Josh Stone
365e00aeee
remove ReadDir.end_of_stream on targets that don't use it
2020-10-09 10:00:11 -07:00
Josh Stone
c1297eca3e
unix/vxworks: make DirEntry slightly smaller
...
`DirEntry` contains a `ReadDir` handle, which used to just be a wrapper
on `Arc<InnerReadDir>`. Commit af75314ecd added `end_of_stream: bool`
which is not needed by `DirEntry`, but adds 8 bytes after padding. We
can let `DirEntry` have an `Arc<InnerReadDir>` directly to avoid that.
2020-10-09 10:00:11 -07:00
Mateusz Mikuła
0c97c24a6c
Remove some dead code in windows-gnu std
2020-10-09 13:23:50 +02:00
Thom Chiovoloni
4f37220510
Implement the same optimization in windows/time
2020-10-08 17:04:32 -07:00
Thom Chiovoloni
59c06e9e40
Switch to using a single atomic and treating 0 as 'uninitialized'
2020-10-08 17:03:16 -07:00
Mara Bos
f1c3edbfab
Assert state in sys/unsupported's RwLock::write_unlock.
...
Co-authored-by: Joshua Nelson <joshua@yottadb.com >
2020-10-09 00:39:03 +02:00
Thom Chiovoloni
e4cf24bd45
Fiddle with the comments
2020-10-08 15:17:35 -07:00
Tomasz Miąsko
6cd5506897
Check for errors returned from posix_spawn*_init functions
...
The posix_spawnattr_init & posix_spawn_file_actions_init might fail,
but their return code is not checked.
Check for non-zero return code and destroy only succesfully initialized
objects.
2020-10-08 23:53:15 +02:00
Tomasz Miąsko
5faf25b95c
Check for non-zero return value from posix_spawn functions
...
The cvt function compares the argument with -1 and when equal returns a new
io::Error constructed from errno. It is used together posix_spawn_* functions.
This is incorrect. Those functions do not set errno. Instead they return
non-zero error code directly.
Check for non-zero return code and use it to construct a new io::Error.
2020-10-08 23:53:15 +02:00
Mara Bos
f4e884288d
Apply deny(unsafe_op_in_unsafe_fn) to all of sys/unsupported.
2020-10-08 23:37:23 +02:00
Dan Gohman
8d2c622d48
Implement AsRawFd for StdinLock etc. on WASI.
...
WASI implements `AsRawFd` for `Stdin`, `Stdout`, and `Stderr`, so
implement it for `StdinLock`, `StdoutLock`, and `StderrLock` as well.
2020-10-08 14:34:54 -07:00
Thom Chiovoloni
f30cc74fb4
Avoid SeqCst or static mut in mach_timebase_info cache
2020-10-08 14:34:11 -07:00
Mara Bos
3d192ace34
Remove unsafety from unsupported/rwlosck.rs by using a Cell.
...
Replacing the UnsafeCell by a Cell makes it all safe.
2020-10-08 23:08:31 +02:00
Mara Bos
c25f69a1e3
Remove unsafety from unsupported/mutex.rs by using a Cell.
...
Replacing the UnsafeCell by a Cell simplifies things and makes it all
safe.
2020-10-08 23:08:31 +02:00
Mara Bos
e55d27fbce
Remove unnecessary rustc_const_stable attributes.
2020-10-08 22:29:13 +02:00
bors
6b8d7911a1
Auto merge of #77346 - Caduser2020:master, r=Mark-Simulacrum
...
`#[deny(unsafe_op_in_unsafe_fn)]` in sys/sgx
This is part of #73904 .
Enclose unsafe operations in unsafe blocks in `libstd/sys/sgx`.
2020-10-08 17:36:25 +00:00
Caduser2020
1fb0a1d501
#[deny(unsafe_op_in_unsafe_fn)] in sys/sgx
...
Run `./x.py` fmt
Add reference link
Fix reference link
Apply review suggestions.
2020-10-08 10:09:18 -05:00
maekawatoshiki
14158f5514
Remove #![allow(unsafe_op_in_unsafe_fn)] except for mod.rs
2020-10-08 22:13:19 +09:00
Mara Bos
b3be11efbd
Formatting.
2020-10-07 18:20:56 +02:00
Mara Bos
060e8cbaf1
Get rid of raw pointers and UnsafeCell in cloudabi condvar.
2020-10-07 18:20:07 +02:00
Mara Bos
41066beb4d
Get rid of UnsafeCell in cloudabi rwlock.
2020-10-07 18:20:07 +02:00
Mara Bos
0f26578f2e
Get rid of UnsafeCell<MaybeUninit>s in cloudabi mutex.
2020-10-07 18:20:07 +02:00
Mara Bos
e6d61ade9c
Use slice_as_mut_ptr instead of first_ptr_mut.
...
This function was renamed.
2020-10-07 18:20:07 +02:00
Mara Bos
f84f01c014
Use futex-based thread-parker for Wasm32.
2020-10-06 20:02:02 +02:00
Mara Bos
03fb61cfef
Formatting.
2020-10-06 18:46:57 +02:00
Mara Bos
13f166a9e6
Add comment documenting NtWaitForKeyedEvent's timeout interpretation.
2020-10-06 18:41:26 +02:00
Mara Bos
43f844b84d
Add documentation to Windows thread parker implementation.
2020-10-06 18:41:26 +02:00
Mara Bos
d1c139360b
Fix typos in comments.
2020-10-06 12:42:52 +02:00
Mara Bos
f47480b8ac
Improve windows thread parker.
...
- Clarify memory ordering and spurious wakeups.
2020-10-06 12:40:55 +02:00
Mara Bos
e9904342eb
Add fast futex-based thread parker for Windows.
2020-10-06 00:34:59 +02:00
Mara Bos
7bfde778a4
Add Keyed Events API to sys::windows::c.
2020-10-06 00:34:36 +02:00