summary refs log tree commit diff
path: root/src/libnative/io
AgeCommit message (Collapse)AuthorLines
2014-01-06Don't read forever on a file descriptorAlex Crichton-4/+4
Similarly to the recent commit to do this for networking, there's no reason that a read on a file descriptor should continue reading until the entire buffer is full. This makes sense when dealing with literal files, but when dealing with things like stdin this doesn't make sense.
2014-01-06Don't wait for a full buffer when reading TCPAlex Crichton-4/+4
libnative erroneously would attempt to fill the entire buffer in a call to `read` before returning, when rather it should return immediately because there's not guaranteed to be any data that will ever be received again. Close #11328
2014-01-05Handle EINTR throughout libnativeAlex Crichton-70/+108
Closes #11214
2014-01-01libnative: Use [from|to]_be16 instead of bswap16Carl-Anton Ingmarsson-6/+2
2013-12-31auto merge of #11187 : alexcrichton/rust/once, r=brsonbors-9/+4
Rationale can be found in the first commit, but this is basically the same thing as `pthread_once`
2013-12-31Convert relevant static mutexes to OnceAlex Crichton-9/+4
2013-12-31Implement native UDP I/OAlex Crichton-89/+264
2013-12-27Implement native TCP I/OAlex Crichton-15/+462
2013-12-27Bring native process bindings up to dateAlex Crichton-70/+136
Move the tests into libstd, use the `iotest!` macro to test both native and uv bindings, and use the cloexec trick to figure out when the child process fails in exec.
2013-12-25Test fixes and rebase conflictsAlex Crichton-1/+2
* vec::raw::to_ptr is gone * Pausible => Pausable * Removing @ * Calling the main task "<main>" * Removing unused imports * Removing unused mut * Bringing some libextra tests up to date * Allowing compiletest to work at stage0 * Fixing the bootstrap-from-c rmake tests * assert => rtassert in a few cases * printing to stderr instead of stdout in fail!()
2013-12-24rustuv: Remove the id() function from IoFactoryAlex Crichton-3/+0
The only user of this was the homing code in librustuv, and it just manually does the cast from a pointer to a uint now.
2013-12-24native: Add tests and cleanup entry pointsAlex Crichton-2/+1
This adds a few smoke tests associated with libnative tasks (not much code to test here anyway), and cleans up the entry points a little bit to be a little more like libgreen. The I/O code doesn't need much testing because that's all tested in libstd (with the iotest! macro).
2013-12-24native: Introduce libnativeAlex Crichton-0/+1835
This commit introduces a new crate called "native" which will be the crate that implements the 1:1 runtime of rust. This currently entails having an implementation of std::rt::Runtime inside of libnative as well as moving all of the native I/O implementations to libnative. The current snag is that the start lang item must currently be defined in libnative in order to start running, but this will change in the future. Cool fact about this crate, there are no extra features that are enabled. Note that this commit does not include any makefile support necessary for building libnative, that's all coming in a later commit.