Skip to content
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

compat: fix pthread_mutex_timedlock #424

Merged
merged 2 commits into from
Jun 16, 2023
Merged

Conversation

jktjkt
Copy link
Contributor

@jktjkt jktjkt commented Jun 15, 2023

compat: return ETIMEDOUT when timing out

refactor: compat: simplify waiting

This code looked a bit fishy:

  • There's no need to check up front whether we're dividing a zero or non-zero number by some constant.

  • The conversion to milliseconds is actually not needed at all because it gets immediately converted to back to nanoseconds.

This code looked a bit fishy:

- There's no need to check up front whether we're dividing a zero or
  non-zero number by some constant.

- The conversion to milliseconds is actually not needed at all because
  it gets immediately converted to back to nanoseconds.
@jktjkt jktjkt marked this pull request as ready for review June 16, 2023 10:46
@michalvasko michalvasko merged commit 2a2b6de into CESNET:devel Jun 16, 2023
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants