(name: &str, vm: &VirtualMachine)
| 576 | } |
| 577 | |
| 578 | fn open_existing(name: &str, vm: &VirtualMachine) -> PyResult<Self> { |
| 579 | let cname = semaphore_name(vm, name)?; |
| 580 | let raw = unsafe { libc::sem_open(cname.as_ptr(), 0) }; |
| 581 | if raw == libc::SEM_FAILED { |
| 582 | let err = Errno::last(); |
| 583 | return Err(os_error(vm, err)); |
| 584 | } |
| 585 | Ok(SemHandle { raw }) |
| 586 | } |
| 587 | |
| 588 | #[inline] |
| 589 | fn as_ptr(&self) -> *mut sem_t { |
nothing calls this directly
no test coverage detected