rt: whitespace cleanup for existing libuv integration
This commit is contained in:
parent
e604c15df1
commit
12f2f4c15c
@ -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() {
|
||||
|
@ -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 <typename T> struct kernel_owned {
|
||||
|
@ -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());
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user