diff options
| author | bors <bors@rust-lang.org> | 2013-03-11 20:21:45 -0700 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2013-03-11 20:21:45 -0700 |
| commit | 48cb9a8ac0b95408a142ea7bc9767414eba2cbb3 (patch) | |
| tree | 2aa22a3dbbdbf2364a41feba5f358dfd3e979574 /src/rt/rust_uv.cpp | |
| parent | a6bb4a0f1a61ab00e09c4cb24dfff95c6c2481c7 (diff) | |
| parent | 676e0290ed4d306e6d7b517de1409c109309a0b2 (diff) | |
| download | rust-48cb9a8ac0b95408a142ea7bc9767414eba2cbb3.tar.gz rust-48cb9a8ac0b95408a142ea7bc9767414eba2cbb3.zip | |
auto merge of #5303 : brson/rust/newsched4, r=brson
r? Followup to #5022. This is the same, but everything is in `core::rt` now. `std::uv_ll` is moved to `core::unstable::uvll`, with the intent that it eventually move into its own crate (blocked on #5192 at least). I've had to disable the uv tests because of #2064. All of `core::rt` is disabled on platforms that aren't mac or linux until I complete the windows thread local storage bindings and ARM context switching. My immediate next priorities will be to fix #2064 and clean up the uv bindings, get everything building on all platforms.
Diffstat (limited to 'src/rt/rust_uv.cpp')
| -rw-r--r-- | src/rt/rust_uv.cpp | 41 |
1 files changed, 25 insertions, 16 deletions
diff --git a/src/rt/rust_uv.cpp b/src/rt/rust_uv.cpp index f08261c336d..51594348737 100644 --- a/src/rt/rust_uv.cpp +++ b/src/rt/rust_uv.cpp @@ -376,16 +376,7 @@ current_kernel_malloc_alloc_cb(uv_handle_t* handle, extern "C" void rust_uv_buf_init(uv_buf_t* out_buf, char* base, size_t len) { - rust_task* task = rust_get_current_task(); - LOG(task, stdlib,"rust_uv_buf_init: base: %lu" \ - "len: %lu", - (unsigned long int)base, - (unsigned long int)len); *out_buf = uv_buf_init(base, len); - LOG(task, stdlib, "rust_uv_buf_init: after: " - "result->base: %" PRIxPTR " len: %" PRIxPTR, - (unsigned long int)(*out_buf).base, - (unsigned long int)(*out_buf).len); } extern "C" uv_loop_t* @@ -481,18 +472,11 @@ rust_uv_free_base_of_buf(uv_buf_t buf) { extern "C" struct sockaddr_in rust_uv_ip4_addr(const char* ip, int port) { - rust_task* task = rust_get_current_task(); - LOG(task, stdlib, "before creating addr_ptr.. ip %s" \ - " port %d\n", ip, port); struct sockaddr_in addr = uv_ip4_addr(ip, port); - LOG(task, stdlib, "after creating .. port: %d", addr.sin_port); return addr; } extern "C" struct sockaddr_in6 rust_uv_ip6_addr(const char* ip, int port) { - rust_task* task = rust_get_current_task(); - LOG(task, stdlib, "before creating addr_ptr.. ip %s" \ - " port %d\n", ip, port); return uv_ip6_addr(ip, port); } extern "C" int @@ -554,3 +538,28 @@ extern "C" sockaddr_in6* rust_uv_addrinfo_as_sockaddr_in6(addrinfo* input) { return (sockaddr_in6*)input->ai_addr; } + +extern "C" uv_idle_t* +rust_uv_idle_new() { + return new uv_idle_t; +} + +extern "C" void +rust_uv_idle_delete(uv_idle_t* handle) { + delete handle; +} + +extern "C" int +rust_uv_idle_init(uv_loop_t* loop, uv_idle_t* idle) { + return uv_idle_init(loop, idle); +} + +extern "C" int +rust_uv_idle_start(uv_idle_t* idle, uv_idle_cb cb) { + return uv_idle_start(idle, cb); +} + +extern "C" int +rust_uv_idle_stop(uv_idle_t* idle) { + return uv_idle_stop(idle); +} |
