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

Use CLOCK_MONOTONIC for mutex waiting on iOS/macOS #73650

Open
akoeplinger opened this issue Aug 9, 2022 · 3 comments
Open

Use CLOCK_MONOTONIC for mutex waiting on iOS/macOS #73650

akoeplinger opened this issue Aug 9, 2022 · 3 comments
Assignees
Labels
Milestone

Comments

@akoeplinger
Copy link
Member

See #58737 and related PRs.

CLOCK_MONOTONIC is available on ios 10+, but not pthread_condattr_setclock. We disable the code on Apple platforms using BROKEN_CLOCK_SOURCE in

#if !defined(CLOCK_MONOTONIC) || defined(HOST_DARWIN) || defined(HOST_WASM)
#define BROKEN_CLOCK_SOURCE
#endif

We should look into using pthread_cond_timedwait with a CLOCK_MONOTONIC argument or alternatively enable clock_gettime (supported by newer macOS/iOS releases) on Apple platforms.

@SamMonoRT
Copy link
Member

Nice to have, but not blocking release. Moving to 9.0.0

@ghost
Copy link

ghost commented Feb 9, 2024

Tagging subscribers to 'os-ios': @steveisok, @akoeplinger, @kotlarmilos
See info in area-owners.md if you want to be subscribed.

Issue Details

See #58737 and related PRs.

CLOCK_MONOTONIC is available on ios 10+, but not pthread_condattr_setclock. We disable the code on Apple platforms using BROKEN_CLOCK_SOURCE in

#if !defined(CLOCK_MONOTONIC) || defined(HOST_DARWIN) || defined(HOST_WASM)
#define BROKEN_CLOCK_SOURCE
#endif

We should look into using pthread_cond_timedwait with a CLOCK_MONOTONIC argument or alternatively enable clock_gettime (supported by newer macOS/iOS releases) on Apple platforms.

Author: akoeplinger
Assignees: ivanpovazan, matouskozak
Labels:

os-mac-os-x, area-VM-meta-mono, os-ios

Milestone: 9.0.0

@ivanpovazan
Copy link
Member

Nice to have, but not blocking release. Moving to 10.0.0

@ivanpovazan ivanpovazan modified the milestones: 9.0.0, 10.0.0 Jul 31, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants