about summary refs log tree commit diff
path: root/src/libstd/rt/io/native
AgeCommit message (Collapse)AuthorLines
2013-11-11Move std::rt::io to std::ioAlex Crichton-1558/+0
2013-11-11Remove #[fixed_stack_segment] and #[rust_stack]Alex Crichton-41/+1
These two attributes are no longer useful now that Rust has decided to leave segmented stacks behind. It is assumed that the rust task's stack is always large enough to make an FFI call (due to the stack being very large). There's always the case of stack overflow, however, to consider. This does not change the behavior of stack overflow in Rust. This is still normally triggered by the __morestack function and aborts the whole process. C stack overflow will continue to corrupt the stack, however (as it did before this commit as well). The future improvement of a guard page at the end of every rust stack is still unimplemented and is intended to be the mechanism through which we attempt to detect C stack overflow. Closes #8822 Closes #10155
2013-11-10Another round of test fixes from previous commitsAlex Crichton-15/+15
2013-11-04Move io::file to io::fs and fns out of FileAlex Crichton-2/+2
This renames the `file` module to `fs` because that more accurately describes its current purpose (manipulating the filesystem, not just files). Additionally, this adds an UnstableFileStat structure as a nested structure of FileStat to signify that the fields should not be depended on. The structure is currently flagged with #[unstable], but it's unlikely that it has much meaning. Closes #10241
2013-11-03Fill out the remaining functionality in io::fileAlex Crichton-7/+9
This adds bindings to the remaining functions provided by libuv, all of which are useful operations on files which need to get exposed somehow. Some highlights: * Dropped `FileReader` and `FileWriter` and `FileStream` for one `File` type * Moved all file-related methods to be static methods under `File` * All directory related methods are still top-level functions * Created `io::FilePermission` types (backed by u32) that are what you'd expect * Created `io::FileType` and refactored `FileStat` to use FileType and FilePermission * Removed the expanding matrix of `FileMode` operations. The mode of reading a file will not have the O_CREAT flag, but a write mode will always have the O_CREAT flag. Closes #10130 Closes #10131 Closes #10121
2013-11-03Remove all blocking std::os blocking functionsAlex Crichton-0/+483
This commit moves all thread-blocking I/O functions from the std::os module. Their replacements can be found in either std::rt::io::file or in a hidden "old_os" module inside of native::file. I didn't want to outright delete these functions because they have a lot of special casing learned over time for each OS/platform, and I imagine that these will someday get integrated into a blocking implementation of IoFactory. For now, they're moved to a private module to prevent bitrot and still have tests to ensure that they work. I've also expanded the extensions to a few more methods defined on Path, most of which were previously defined in std::os but now have non-thread-blocking implementations as part of using the current IoFactory. The api of io::file is in flux, but I plan on changing it in the next commit as well. Closes #10057
2013-10-30Make Writer::flush a no-op default methodAlex Crichton-2/+0
Closes #9126
2013-10-29librustc: Implement the `proc` type as sugar for `~once fn` and `proc`Patrick Walton-7/+9
notation for closures, and disable the feature gate for `once fn` if used with the `~` sigil.
2013-10-24Test fixes and merge conflictsAlex Crichton-3/+15
2013-10-24Move as much I/O as possible off of native::ioAlex Crichton-0/+6
When uv's TTY I/O is used for the stdio streams, the file descriptors are put into a non-blocking mode. This means that other concurrent writes to the same stream can fail with EAGAIN or EWOULDBLOCK. By all I/O to event-loop I/O, we avoid this error. There is one location which cannot move, which is the runtime's dumb_println function. This was implemented to handle the EAGAIN and EWOULDBLOCK errors and simply retry again and again.
2013-10-22Drop the '2' suffix from logging macrosAlex Crichton-22/+22
Who doesn't like a massive renaming?
2013-10-17std: Move size/align functions to std::mem. #2240Brian Anderson-2/+2
2013-10-10Implement rt::io::stdioAlex Crichton-1/+2
Additionally, this moves the prelude imports of print/println from std::io to std::rt::io. Closes #6846
2013-10-09Implement io::native::processAlex Crichton-0/+745
2013-10-09Implement io::native::stdioAlex Crichton-0/+67
2013-10-09Implement io::native::fileAlex Crichton-25/+230
2013-10-02Stop using newtype wrappers in std::rt::ioSteven Fackler-3/+6
UnboundedPipeStream is still a newtype since process::set_stdio needs to look into its internals. Closes #9667
2013-09-30std: Remove usage of fmt!Alex Crichton-14/+14
2013-05-22libstd: Rename libcore to libstd and libstd to libextra; update makefiles.Patrick Walton-0/+74
This only changes the directory names; it does not change the "real" metadata names.