Skip to content

Commit c39d5b5

Browse files
committed
try fix ci
1 parent 5627525 commit c39d5b5

4 files changed

Lines changed: 13 additions & 3 deletions

File tree

immix

planglib/std/task/reactor.pi

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,6 @@ fn write_cb(req:*libuv::uv_write_t, status:i32) void {
113113
use std::io;
114114

115115

116-
117116
fn async_cb(async_t:*libuv::uv_async_t) void {
118117
let reactor = libuv::get_data_for_handle<libuv::uv_async_t|UVReactor>(async_t);
119118
let ch = reactor.ch;
@@ -123,6 +122,8 @@ fn async_cb(async_t:*libuv::uv_async_t) void {
123122
let timer = libuv::new_uv_timer_t();
124123
gc::keep_alive_pinned(timer);
125124
let cb = unsafe_cast<()>(&timer_cb);
125+
gc::pin(cb);
126+
gc::keep_alive_pinned(cb);
126127
libuv::uv_timer_init(libuv::uv_default_loop(), timer);
127128
libuv::set_data_for_handle(timer, &ev);
128129
libuv::uv_timer_start(timer, cb, ev.timeout_ms, ev.repeat_ms);

vm/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ edition = "2021"
88
[dependencies]
99
internal_macro = { path = "../internal_macro",default-features = false }
1010
backtrace = "0.3"
11-
immix = { path = "../immix", default-features = false, features = ["llvm_stackmap", "auto_gc", "madv_dontneed", "conservative_stack_scan", "c-api", "gc_profile"] }
11+
immix = { path = "../immix", default-features = false, features = ["llvm_stackmap", "auto_gc", "madv_dontneed", "conservative_stack_scan", "c-api"] }
1212
# env_logger = "0.10"
1313
log = { version = "0.4", features = ["std"] }
1414
libc = "0.2"

vm/src/mutex/mod.rs

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ fn create_mutex(mutex: *mut *mut OpaqueMutex) -> u64 {
2222
}))
2323
.cast();
2424
fn drop_mutex_f(mutex: *mut u8) {
25+
eprintln!("drop_mutex_f {:p}", mutex);
2526
unsafe {
2627
drop(Box::from_raw(mutex.cast::<MutexContainer>()));
2728
}
@@ -32,11 +33,13 @@ fn create_mutex(mutex: *mut *mut OpaqueMutex) -> u64 {
3233

3334
#[is_runtime]
3435
fn lock_mutex(mutex: *mut OpaqueMutex) -> u64 {
36+
eprintln!("lock_mutex {:p}", mutex);
3537
let container: &MutexContainer = &*mutex.cast();
3638
// immix::thread_stuck_start();
3739
let lock: MutexGuard<'static, _> = mem::transmute(container.mutex.lock().unwrap());
3840
// immix::thread_stuck_end();
3941
container.guard.set(Some(lock));
42+
eprintln!("lock_mutex end {:p}", mutex);
4043
0
4144
}
4245

@@ -66,24 +69,30 @@ fn drop_condvar(cond: *mut Condvar) -> u64 {
6669

6770
#[is_runtime]
6871
fn condvar_wait(cond: *mut Condvar, mutex: *mut OpaqueMutex) -> u64 {
72+
eprintln!("condvar_wait {:p} {:p}", cond, mutex);
6973
let container: &MutexContainer = &*mutex.cast();
7074
let lock = container.guard.replace(None).unwrap();
7175
let cond = unsafe { &*cond };
7276
let lock = cond.wait::<()>(lock).unwrap();
7377
container.guard.set(Some(lock));
78+
eprintln!("condvar_wait end {:p} {:p}", cond, mutex);
7479
0
7580
}
7681

7782
#[is_runtime]
7883
fn condvar_notify(cond: *mut Condvar) -> u64 {
84+
eprintln!("condvar_notify {:p}", cond);
7985
let cond = unsafe { &*cond };
8086
cond.notify_one();
87+
eprintln!("condvar_notify end {:p}", cond);
8188
0
8289
}
8390

8491
#[is_runtime]
8592
fn condvar_notify_all(cond: *mut Condvar) -> u64 {
93+
eprintln!("condvar_notify_all {:p}", cond);
8694
let cond = unsafe { &*cond };
8795
cond.notify_all();
96+
eprintln!("condvar_notify_all end {:p}", cond);
8897
0
8998
}

0 commit comments

Comments
 (0)