Skip to content

posix: implement pthread_condattr_setclock() #59948

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
Tracked by #51211
ycsin opened this issue Jul 3, 2023 · 0 comments · Fixed by #61926
Closed
Tracked by #51211

posix: implement pthread_condattr_setclock() #59948

ycsin opened this issue Jul 3, 2023 · 0 comments · Fixed by #61926
Labels
area: POSIX POSIX API Library Feature Request A request for a new feature Good first issue Good for a first time contributor to take
Milestone

Comments

@ycsin
Copy link
Member

ycsin commented Jul 3, 2023

There are currently 20 missing POSIX functions with trivial implementations, pthread_condattr_setclock() is one of them.

pthread_condattr_getclock, pthread_condattr_setclock - get and set the clock selection condition variable attribute

The pthread_condattr_getclock() function shall obtain the value of the clock attribute from the attributes object referenced by attr.

The pthread_condattr_setclock() function shall set the clock attribute in an initialized attributes object referenced by attr. If pthread_condattr_setclock() is called with a clock_id argument that refers to a CPU-time clock, the call shall fail.

The clock attribute is the clock ID of the clock that shall be used to measure the timeout service of pthread_cond_timedwait(). The default value of the clock attribute shall refer to the system clock.

The behavior is undefined if the value specified by the attr argument to pthread_condattr_getclock() or pthread_condattr_setclock() does not refer to an initialized condition variable attributes object.

See https://pubs.opengroup.org/onlinepubs/9699919799/functions/pthread_condattr_setclock.html

See RFC #51211 for more info.

@ycsin ycsin added Feature Request A request for a new feature Good first issue Good for a first time contributor to take area: POSIX POSIX API Library labels Jul 3, 2023
@ycsin ycsin added this to the v3.5.0 milestone Jul 3, 2023
@ycsin ycsin moved this from To Do to LTS3 Goals in Release Plan Jul 3, 2023
@cfriedt cfriedt assigned cfriedt and unassigned cfriedt Jul 4, 2023
@cfriedt cfriedt removed the status in Release Plan Sep 12, 2023
@nashif nashif removed this from Release Plan Sep 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: POSIX POSIX API Library Feature Request A request for a new feature Good first issue Good for a first time contributor to take
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants