Gives up the processor for another thread to run. Usually called when a thread has nothing useful to do and can wait for an undetermined amount of time.
()
| 225 | /// Usually called when a thread has nothing useful to do |
| 226 | /// and can wait for an undetermined amount of time. |
| 227 | pub fn thread_yield() { |
| 228 | unsafe{ |
| 229 | asm!("syscall", |
| 230 | in("rax") SYSCALL_YIELD, |
| 231 | out("rcx") _, |
| 232 | out("r11") _); |
| 233 | } |
| 234 | } |
| 235 | |
| 236 | /// Wait for a message to be received |
| 237 | pub fn receive(handle: &CommHandle) -> Result<Message, SyscallError> { |
no outgoing calls
no test coverage detected