about summary refs log tree commit diff
path: root/src/libstd/sys
AgeCommit message (Collapse)AuthorLines
2018-07-13Fix redox libstd leftoverTatsuyuki Ishi-2/+2
2018-07-11Use fast TLS on FuchsiaTaylor Cramer-6/+1
2018-07-11Auto merge of #51553 - jD91mZM2:uds, r=sfacklerbors-1/+740
Unix sockets on redox This is done using the ipcd daemon. It's not exactly like unix sockets because there is not actually a physical file for the path, but it's close enough for a basic implementation :) This allows mio-uds and tokio-uds to work with a few modifications as well, which is exciting!
2018-07-10Add missing `dyn` for cloudabi, redox, unix and wasmljedrz-7/+7
2018-07-10Deny bare trait objects in `src/libstd`.ljedrz-1/+1
2018-07-08Delete leftover filesjD91mZM2-606/+0
2018-07-07Add is_unnamedjD91mZM2-0/+27
2018-07-07Revert unification of interfacesjD91mZM2-29/+1539
2018-07-03Rollup merge of #51809 - drrlvn:rw_exact_all_at, r=alexcrichtonPietro Albini-0/+127
Add read_exact_at and write_all_at methods to FileExt on unix This PR adds `FileExt::read_exact_at()` and `FileExt::write_all_at()`, which are to `read_at()` and `write_at()` as `read_exact()` and `write_all()` are to `read()` and `write()`. This allows the user to not have to deal with `ErrorKind::Interrupted` and calling the functions in a loop. I was unsure as to how to mark these new methods so I marked them `unstable`, please let me know if I should have done it differently. I asked in Discord and was told that as this change is small it does not require an RFC.
2018-07-03Remove stability attributes on private types and leftover docsjD91mZM2-18/+0
2018-07-02Fill in tracking issue number for read_exact_at/write_all_atDror Levin-2/+2
2018-06-28Change traits to bare FnMut where possible.moxian-111/+67
2018-06-28Make msvc symbol extraction/printing functions generic.moxian-103/+137
2018-06-28Make stackwalking generic instead of matching on enum variants.moxian-133/+147
2018-06-28Load backtrace-related functions only oncemoxian-41/+77
.. and pass them around in BacktraceContext.
2018-06-28Split separate stackwalk variants into their own functionsmoxian-204/+238
.. rather than having them be one giant match statement.
2018-06-28Add a fallback for stacktrace printing for older Windows versions.moxian-108/+331
PR #47252 switched stack inspection functions of dbghelp.dll to their newer alternatives that also capture inlined context. Unfortunately, said new alternatives are not present in older dbghelp.dll versions. In particular Windows 7 at the time of writing has dbghelp.dll version 6.1.7601 from 2010, that lacks StackWalkEx and friends. Fixes #50138
2018-06-27Add is_unnamed on redoxjD91mZM2-24/+30
2018-06-27[fuchsia] Update zx_cprng_draw to target semanticsAdam Barth-26/+2
This change is the final step in improving the semantics of zx_cprng_draw. Now the syscall always generates the requested number of bytes. If the syscall would have failed to generate the requested number of bytes, the syscall either terminates the entire operating system or terminates the calling process, depending on whether the error is a result of the kernel misbehaving or the userspace program misbehaving.
2018-06-27Fix tidy checksjD91mZM2-5/+19
2018-06-27Horrible attempt at cleaning things up that probably just made it worsejD91mZM2-1549/+643
2018-06-26Revert "Remove functions that always error"jD91mZM2-0/+181
This reverts commit 21d09b983de87fec2e98832f4c30b52f12d6342f.
2018-06-26Mention redox' behavior in doc commentsjD91mZM2-0/+12
2018-06-26Remove functions that always errorjD91mZM2-181/+0
2018-06-26Disallow constructing SocketAddr from third-party codejD91mZM2-2/+2
2018-06-26Make feature unstablejD91mZM2-40/+1
2018-06-26Custom feature gate (I think?)jD91mZM2-40/+40
2018-06-26Trim all lines to 100jD91mZM2-3/+10
2018-06-26Make UnixStream::take_error return None on redoxjD91mZM2-3/+3
2018-06-26Unix sockets on redox!jD91mZM2-1/+733
2018-06-26Add read_exact_at and write_all_at methods to FileExt on unixDror Levin-0/+127
2018-06-26Rollup merge of #51786 - cuviper:stat64-pointers, r=Mark-SimulacrumPietro Albini-2/+2
Remove unnecessary stat64 pointer casts In effect, these just casted `&mut stat64` to `*mut stat64`, twice. That's harmless, but it masked a problem when this was copied to new code calling `fstatat`, which takes a pointer to `struct stat`. That will be fixed by #51785, but let's remove the unnecessary casts here too.
2018-06-26Rollup merge of #51642 - GuillaumeGomez:fix-unknown-windows-build, r=oli-obkPietro Albini-0/+3
Fix unknown windows build Fixes #51618.
2018-06-26Auto merge of #50630 - sharkdp:fix-50619, r=sfacklerbors-7/+24
Fix possibly endless loop in ReadDir iterator Certain directories in `/proc` can cause the `ReadDir` iterator to loop indefinitely. We get an error code (22) when calling libc's `readdir_r` on these directories, but `entry_ptr` is `NULL` at the same time, signalling the end of the directory stream. This change introduces an internal state to the iterator such that the `Some(Err(..))` value will only be returned once when calling `next`. Subsequent calls will return `None`. fixes #50619
2018-06-25Remove unnecessary stat64 pointer castsJosh Stone-2/+2
In effect, these just casted `&mut stat64` to `*mut stat64`, twice. That's harmless, but it masked a problem when this was copied to new code calling `fstatat`, which takes a pointer to `struct stat`. That will be fixed by #51785, but let's remove the unnecessary casts here too.
2018-06-25Use fstatat64 where availableJosh Stone-6/+5
2018-06-25Add missing \[allow(missing_docs)\]Guillaume Gomez-0/+1
2018-06-20Fix doc build on unknown windows targetGuillaume Gomez-0/+2
2018-06-19Update zx_cprng_draw_new on FuchsiaAdam Barth-4/+3
Fuchsia is changing the semantics for zx_cprng_draw and zx_cprng_draw_new is a temporary name for the new semantics.
2018-06-17Auto merge of #51529 - nodakai:improve-sys_common-mutex, r=oli-obkbors-36/+20
libstd: add an RAII utility for sys_common::mutex::Mutex It is indeed debatable whether or not we should introduce more sophistication like this to the lowest layer of a system library. In fact, `Drop::drop()` cannot be `unsafe` (IIRC there was a discussion on introducing an unsafe variant of `Drop` whose entire scope must be within `unsafe`)
2018-06-17Auto merge of #51555 - ccesare:remove_unused_variables_redox_os, r=kennytmbors-3/+0
Removed two unused variables in os.rs Issue #51419 suggested removing two unused variables in `libstd/sys/redox/os.rs`. This PR implements that change. It compiles for me locally, but I haven't run any other tests.
2018-06-17libstd: add an RAII utility for sys_common::mutex::MutexNODA, Kai-36/+20
Signed-off-by: NODA, Kai <nodakai@gmail.com>
2018-06-15Fix issue on unixGuillaume Gomez-0/+1
2018-06-14Removed two unused variablesChris Cesare-3/+0
2018-06-13Add missing allow_missing_docsGuillaume Gomez-0/+1
2018-06-12Fix possibly endless loop in ReadDir iteratorsharkdp-7/+24
Certain directories in `/proc` can cause the `ReadDir` iterator to loop indefinitely. We get an error code (22) when calling libc's `readdir_r` on these directories, but `entry_ptr` is `NULL` at the same time, signalling the end of the directory stream. This change introduces an internal state to the iterator such that the `Some(Err(..))` value will only be returned once when calling `next`. Subsequent calls will return `None`. fixes #50619
2018-06-09Auto merge of #51359 - cramertj:fdio_spawn, r=sfacklerbors-109/+51
[fuchsia] Migrate from launchpad to fdio_spawn_etc fdio_spawn_etc is the preferred way of creating processes on Fuchsia now. cc @abarth
2018-06-07[fuchsia] Migrate from launchpad to fdio_spawn_etcAdam Barth-109/+51
fdio_spawn_etc is the preferred way of creating processes on Fuchsia now.
2018-06-05Rollup merge of #51255 - avdv:patch-1, r=kennytmMark Simulacrum-2/+2
Fix confusing error message for sub_instant When subtracting an Instant from another, the function will panick when `RHS > self`, but the error message confusingly displays a different error: ```rust let i = Instant::now(); let other = Instant::now(); if other > i { println!("{:?}", i - other); } ``` This results in a panic: ``` thread 'test_instant' panicked at 'other was less than the current instant', libstd/sys/unix/time.rs:292:17 ``` But clearly, `other` was actually greater than the current instant.
2018-06-04Clarify error phrase in `sub_instant` functionClaudio Bley-2/+2
Uses the same wording as [`src/libstd/sys/windows/time.rs`][1]. 1: https://github.com/avdv/rust/blob/95e2bf253d864c5e14ad000ffa2040ce85916056/src/libstd/sys/windows/time.rs#L65