-
Notifications
You must be signed in to change notification settings - Fork 1.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix FreeBSD condvar semantics #10460
Conversation
Otherwise it makes sense to me. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
and with my apologies.
We should return -1 instead of negative deltas, and 0 if signaled. Signed-off-by: Ryan Moeller <[email protected]>
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks.
(I think it'd help if openzfs documented its internal APIs - even in a one-line comment - instead of relying on the implicit knowledge that they should match |
Codecov Report
@@ Coverage Diff @@
## master #10460 +/- ##
==========================================
- Coverage 80.24% 79.43% -0.82%
==========================================
Files 293 393 +100
Lines 83882 123859 +39977
==========================================
+ Hits 67313 98385 +31072
- Misses 16569 25474 +8905
Continue to review full report at Codecov.
|
We should return -1 instead of negative deltas, and 0 if signaled. Reviewed-by: Alexander Motin <[email protected]> Reviewed-by: Brian Behlendorf <[email protected]> Reviewed-by: Jorgen Lundman <[email protected]> Signed-off-by: Ryan Moeller <[email protected]> Closes #10460
We should return -1 instead of negative deltas, and 0 if signaled. Reviewed-by: Alexander Motin <[email protected]> Reviewed-by: Brian Behlendorf <[email protected]> Reviewed-by: Jorgen Lundman <[email protected]> Signed-off-by: Ryan Moeller <[email protected]> Closes openzfs#10460
We should return -1 instead of negative deltas, and 0 if signaled. Reviewed-by: Alexander Motin <[email protected]> Reviewed-by: Brian Behlendorf <[email protected]> Reviewed-by: Jorgen Lundman <[email protected]> Signed-off-by: Ryan Moeller <[email protected]> Closes openzfs#10460
Motivation and Context
FreeBSD's SPL cv_timedwait_* implementations returned deltas in all cases. The correct semantics are:
(Source: https://illumos.org/man/9F/cv_timedwait)
Description
Return -1 instead of negative deltas, and 0 if signaled.
How Has This Been Tested?
ZTS on FreeBSD.
Types of changes
Checklist:
Signed-off-by
.