Skip to content

Commit

Permalink
OpenBSD returns EINVAL in the same way as DragonFlyBSD.
Browse files Browse the repository at this point in the history
  • Loading branch information
ltratt committed Dec 19, 2020
1 parent 1444858 commit ca211ce
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions core/src/thread_parker/unix.rs
Expand Up @@ -156,13 +156,13 @@ impl Drop for ThreadParker {
// this behaviour no longer occurs. The same applies to condvars.
unsafe {
let r = libc::pthread_mutex_destroy(self.mutex.get());
if cfg!(target_os = "dragonfly") {
if cfg!(any(target_os = "dragonfly", target_os = "openbsd")) {
debug_assert!(r == 0 || r == libc::EINVAL);
} else {
debug_assert_eq!(r, 0);
}
let r = libc::pthread_cond_destroy(self.condvar.get());
if cfg!(target_os = "dragonfly") {
if cfg!(any(target_os = "dragonfly", target_os = "openbsd")) {
debug_assert!(r == 0 || r == libc::EINVAL);
} else {
debug_assert_eq!(r, 0);
Expand Down

0 comments on commit ca211ce

Please sign in to comment.