From 12f2f4c15c467991d5675bbc4be7f7c2012ee5d3 Mon Sep 17 00:00:00 2001 From: Jeff Olson Date: Mon, 16 Apr 2012 13:06:41 -0700 Subject: [PATCH] rt: whitespace cleanup for existing libuv integration --- src/libstd/uv.rs | 2 +- src/rt/rust_kernel.h | 14 +++++++------- src/rt/rust_uv.cpp | 18 +++++++++--------- 3 files changed, 17 insertions(+), 17 deletions(-) diff --git a/src/libstd/uv.rs b/src/libstd/uv.rs index 6d548dcdc20..941b34c52a3 100644 --- a/src/libstd/uv.rs +++ b/src/libstd/uv.rs @@ -1252,7 +1252,7 @@ mod test { log(debug, output); assert native_handle_size as uint == rust_handle_size; } - + #[test] #[ignore(cfg(target_os = "freebsd"))] fn test_uv_struct_size_uv_timer_t() { diff --git a/src/rt/rust_kernel.h b/src/rt/rust_kernel.h index a93ed118a35..2309f4e6c1a 100644 --- a/src/rt/rust_kernel.h +++ b/src/rt/rust_kernel.h @@ -73,9 +73,9 @@ class rust_kernel { rust_scheduler* get_scheduler_by_id_nolock(rust_sched_id id); void end_weak_tasks(); - // Used to communicate with the process-side, global libuv loop - uintptr_t global_loop_chan; - void** global_async_handle; + // Used to communicate with the process-side, global libuv loop + uintptr_t global_loop_chan; + void** global_async_handle; public: struct rust_env *env; @@ -122,10 +122,10 @@ public: bool send_to_port(rust_port_id chan, void *sptr); - uintptr_t* get_global_loop() { return &global_loop_chan; } - void** get_global_async_handle() { return global_async_handle; } - void set_global_async_handle(void* handle) { - *global_async_handle = handle; } + uintptr_t* get_global_loop() { return &global_loop_chan; } + void** get_global_async_handle() { return global_async_handle; } + void set_global_async_handle(void* handle) { + *global_async_handle = handle; } }; template struct kernel_owned { diff --git a/src/rt/rust_uv.cpp b/src/rt/rust_uv.cpp index 2130d374d10..287e45aecd6 100644 --- a/src/rt/rust_uv.cpp +++ b/src/rt/rust_uv.cpp @@ -209,12 +209,12 @@ rust_uv_hilvl_timer_start(uv_timer_t* the_timer, uint32_t timeout, extern "C" int rust_uv_timer_init(uv_loop_t* loop, uv_timer_t* timer) { - return uv_timer_init(loop, timer); + return uv_timer_init(loop, timer); } extern "C" int rust_uv_timer_start(uv_timer_t* the_timer, uv_timer_cb cb, - uint32_t timeout, uint32_t repeat) { + uint32_t timeout, uint32_t repeat) { return uv_timer_start(the_timer, cb, timeout, repeat); } @@ -439,22 +439,22 @@ rust_uv_ip4_addr(const char* ip, int port) { extern "C" uintptr_t* rust_uv_get_kernel_global_chan_ptr() { - uintptr_t* result = rust_get_current_task()->kernel->get_global_loop(); + uintptr_t* result = rust_get_current_task()->kernel->get_global_loop(); rust_task* task = rust_get_current_task(); - LOG(task, stdlib, "global loop: %lu", (unsigned long int)result); - LOG(task, stdlib,"global loop val: %lu", (unsigned long int)*result); - return result; + LOG(task, stdlib, "global loop: %lu", (unsigned long int)result); + LOG(task, stdlib,"global loop val: %lu", (unsigned long int)*result); + return result; } extern "C" void** rust_uv_get_kernel_global_async_handle() { - return rust_get_current_task()->kernel->get_global_async_handle(); + return rust_get_current_task()->kernel->get_global_async_handle(); } extern "C" void rust_uv_set_kernel_global_async_handle(uv_async_t* handle) { - rust_get_current_task()->kernel->set_global_async_handle((void*)handle); + rust_get_current_task()->kernel->set_global_async_handle((void*)handle); } extern "C" void rust_uv_free_kernel_global_async_handle() { - free((void*)rust_get_current_task()->kernel->get_global_async_handle()); + free((void*)rust_get_current_task()->kernel->get_global_async_handle()); }