#2608 closed defect (fixed)

POSIX Condition Variables Clock Attribute Support

Reported by: Joel Sherrill Owned by: Gedare Bloom
Priority: normal Milestone: 5.1
Component: posix Version: 5
Severity: normal Keywords: POSIX-Compliance
Cc: Sebastian Huber Blocked By:
Blocking:

Description

I am beginning to add support for the clock attribute to POSIX condition variables.

http://pubs.opengroup.org/onlinepubs/9699919799/functions/pthread_condattr_getclock.html

Since the clock can't be a CPU time clock, that leaves CLOCK_MONOTONIC and CLOCK_REALTIME. The thread queue is based on CLOCK_MONOTONIC and does not have an option to use CLOCK_REALTIME. Threads and timers waiting on CLOCK_REALTIME should be impacted by time of day changes.

https://docs.google.com/document/d/1GsGer0t84p-nUfZFim4Ty0LTDYNhgKBvlwip_gLQjTY/edit?usp=sharing is a Google doc with my notes so far in it on POSIX clocks. I will move it to the Wiki as it turns into something more concrete than notes and reflects plans/code.

So the first issue is how best to alter the thread queue to support using either clock source? And what does that do to the current ticks based API since you proposed different time representations for the ticks (relative/monotonic) and seconds (absolute/realtime) structures?

Change History (8)

comment:1 Changed on Jun 16, 2016 at 2:04:39 PM by Joel Sherrill <joel@…>

In 6131b849081335e101f92b4a99e01572153d44f5/rtems:

Add pthread_condattr_getclock() and pthread_condattr_setclock()

updates #2608.

comment:2 Changed on Apr 3, 2017 at 11:18:33 PM by Joel Sherrill

Keywords: POSIX-Compliance added

comment:3 Changed on May 11, 2017 at 7:31:02 AM by Sebastian Huber

Milestone: 4.124.12.0

comment:4 Changed on Oct 11, 2017 at 11:18:54 PM by Joel Sherrill

Owner: changed from Joel Sherrill to Gedare Bloom
Status: newassigned

Gedare.. I checked and think this is implemented and I thought you did the final part of the work. If you concur it is implemented, please close.

comment:5 Changed on Oct 12, 2017 at 5:35:35 AM by Sebastian Huber

See also #3182.

comment:6 Changed on Oct 16, 2017 at 6:23:11 AM by Sebastian Huber

Component: unspecifiedposix

comment:7 Changed on Nov 9, 2017 at 6:27:14 AM by Sebastian Huber

Milestone: 4.12.05.1

Milestone renamed

comment:8 Changed on Dec 5, 2017 at 5:04:20 PM by Gedare Bloom

Resolution: fixed
Status: assignedclosed
Note: See TracTickets for help on using tickets.