clean and trying the global loop test as two separate loop lifetimes..
.. seeing an occasional valgrind/barf spew on some invalid read/writes.. need to investigate further.. i think its related to my poor citizen conduct, re: pointers stashed in rust_kernel..
This commit is contained in:
committed by
Brian Anderson
parent
31ba223c26
commit
e0f110aa12
@@ -256,7 +256,7 @@ crust fn tear_down_close_cb(handle: *ll::uv_async_t) unsafe {
|
||||
handle));
|
||||
// TODO: iterate through open handles on the loop and uv_close()
|
||||
// them all
|
||||
let data = ll::get_data_for_uv_handle(handle) as *global_loop_data;
|
||||
//let data = ll::get_data_for_uv_handle(handle) as *global_loop_data;
|
||||
}
|
||||
|
||||
fn high_level_tear_down(data: *global_loop_data) unsafe {
|
||||
@@ -458,12 +458,11 @@ mod test {
|
||||
};
|
||||
log(debug, "exiting simple timer cb");
|
||||
}
|
||||
#[test]
|
||||
fn test_uv_hl_simple_timer() unsafe {
|
||||
|
||||
fn impl_uv_hl_simple_timer(hl_loop: high_level_loop) unsafe {
|
||||
let exit_po = comm::port::<bool>();
|
||||
let exit_ch = comm::chan(exit_po);
|
||||
let exit_ch_ptr = ptr::addr_of(exit_ch);
|
||||
let hl_loop = get_global_loop();
|
||||
let timer_handle = ll::timer_t();
|
||||
let timer_ptr = ptr::addr_of(timer_handle);
|
||||
interact(hl_loop) {|loop_ptr|
|
||||
@@ -489,4 +488,11 @@ mod test {
|
||||
comm::recv(exit_po);
|
||||
log(debug, "test_uv_hl_simple_timer: msg recv on exit_po, done..");
|
||||
}
|
||||
#[test]
|
||||
#[ignore(cfg(target_os = "freebsd"))]
|
||||
fn test_uv_hl_high_level_global_timer() unsafe {
|
||||
let hl_loop = get_global_loop();
|
||||
impl_uv_hl_simple_timer(hl_loop);
|
||||
impl_uv_hl_simple_timer(hl_loop);
|
||||
}
|
||||
}
|
||||
@@ -27,7 +27,7 @@ rust_kernel::rust_kernel(rust_env *env) :
|
||||
// set up storage of pointers needed to
|
||||
// access the global loop.
|
||||
global_loop_chan = 0;
|
||||
global_async_handle = (void**)::malloc( // FIXME -- can use this->malloc()
|
||||
global_async_handle = (void**)::malloc( // FIXME--can't use this->malloc()
|
||||
sizeof(void*)); // .. what do?
|
||||
*global_async_handle = (void*)0;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user