()
| 29 | } |
| 30 | |
| 31 | unsafe fn second() -> ! { |
| 32 | println!("Second want to continue,but need to wait A=1"); |
| 33 | mutex_lock(MUTEX_ID); |
| 34 | while A == 0 { |
| 35 | println!("Second: A is {}", A); |
| 36 | condvar_wait(CONDVAR_ID, MUTEX_ID); |
| 37 | } |
| 38 | mutex_unlock(MUTEX_ID); |
| 39 | println!("A is {}, Second can work now", A); |
| 40 | exit(0) |
| 41 | } |
| 42 | |
| 43 | #[no_mangle] |
| 44 | pub fn main() -> i32 { |
nothing calls this directly
no test coverage detected