Skip to content

posix: timer: unable to create a timer with CLOCK_REALTIME #67874

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

Closed
cfriedt opened this issue Jan 20, 2024 · 0 comments · Fixed by #67871
Closed

posix: timer: unable to create a timer with CLOCK_REALTIME #67874

cfriedt opened this issue Jan 20, 2024 · 0 comments · Fixed by #67871
Assignees
Labels
area: POSIX POSIX API Library bug The issue is a bug, or the PR is fixing a bug

Comments

@cfriedt
Copy link
Member

cfriedt commented Jan 20, 2024

Describe the bug
According to the spec for timer_create()

All implementations shall support a clock_id of CLOCK_REALTIME

However, currently, attempting to create a timer using that clock id results in -1 / EINVAL.

Please also mention any information which could help others to understand
the problem you're facing:

  • What target platform are you using? Any
  • What have you tried to diagnose or workaround this issue? Looked at code
  • Is this a regression? Techniically no, but the bug was introduced in f603e60 (where timers were added)

To Reproduce
Steps to reproduce the behavior:

  1. Look at code
  2. Compare with spec
  3. See error

Expected behavior
Should be able to use CLOCK_REALTIME with timer_create().

Impact
Without this fix, conformance is broken

Logs and console output

Environment (please complete the following information):

  • OS: Linux
  • Toolchain: Zephyr SDK v0.16.4
  • Commit: f603e60

Additional context

@cfriedt cfriedt added the bug The issue is a bug, or the PR is fixing a bug label Jan 20, 2024
@henrikbrixandersen henrikbrixandersen added the area: POSIX POSIX API Library label Jan 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: POSIX POSIX API Library bug The issue is a bug, or the PR is fixing a bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants