Skip to content

Commit

Permalink
Revert "OpenBSD returns EINVAL in the same way as DragonFlyBSD."
Browse files Browse the repository at this point in the history
This reverts commit ca211ce.
  • Loading branch information
ltratt committed Dec 21, 2020
1 parent ca211ce commit b6d4fdb
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions core/src/thread_parker/unix.rs
Original file line number Diff line number Diff line change
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!(any(target_os = "dragonfly", target_os = "openbsd")) {
if cfg!(target_os = "dragonfly") {
debug_assert!(r == 0 || r == libc::EINVAL);
} else {
debug_assert_eq!(r, 0);
}
let r = libc::pthread_cond_destroy(self.condvar.get());
if cfg!(any(target_os = "dragonfly", target_os = "openbsd")) {
if cfg!(target_os = "dragonfly") {
debug_assert!(r == 0 || r == libc::EINVAL);
} else {
debug_assert_eq!(r, 0);
Expand Down

0 comments on commit b6d4fdb

Please sign in to comment.