()
| 23 | |
| 24 | #[no_mangle] |
| 25 | pub fn main() -> i32 { |
| 26 | let mut v = Vec::new(); |
| 27 | let args = [ |
| 28 | Argument { ch: 'a', rc: 1 }, |
| 29 | Argument { ch: 'b', rc: 2 }, |
| 30 | Argument { ch: 'c', rc: 3 }, |
| 31 | ]; |
| 32 | for arg in args.iter() { |
| 33 | v.push(thread_create( |
| 34 | thread_print as usize, |
| 35 | arg as *const _ as usize, |
| 36 | )); |
| 37 | } |
| 38 | for tid in v.iter() { |
| 39 | let exit_code = waittid(*tid as usize); |
| 40 | println!("thread#{} exited with code {}", tid, exit_code); |
| 41 | } |
| 42 | println!("main thread exited."); |
| 43 | 0 |
| 44 | } |
nothing calls this directly
no test coverage detected