[PATCH 0/5] v2: Progress toward absolute time intervals

Gedare Bloom gedare at rtems.org
Wed Jul 13 17:39:45 UTC 2016


These patches move forward toward a goal to provide support
for the CLOCK_ABSTIME in POSIX. Version 2 includes fixes to
address Sebastian's review on version 1. In addition to the
clock_nanosleep service, now I also include cond_timedwait.
Timeout fields are in the threadq context, with a new type
Watchdog_Discipline and corresponding relative, absolute,
and now WATCHDOG_NO_TIMEOUT uses this type. For backward
compatibility, the threadq enqueue interprets relative
discipline with a timeout of 0 as a WATCHDOG_NO_TIMEOUT.

v2:
* revert back to 32-bit watchdog intervals.
* consolidate functions for setting context timeout params.
* add abstime for cond_timewait (patches 4/5 and 5/5).
* fix switch logic and local var use in threadq enqueue.

Gedare Bloom (5):
  cpukit: Add and use Watchdog_Discipline.
  posix: add clock_nanosleep and tests
  cpukit/rtems: fix return type mismatch for _TOD_To_seconds
  posix: refactor cond wait support to defer abstime conversion
  posix: cond_timedwait remember and use clock from condattr

 cpukit/libnetworking/rtems/rtems_glue.c            |   2 +-
 cpukit/posix/include/rtems/posix/cond.h            |   1 +
 cpukit/posix/include/rtems/posix/condimpl.h        |   7 +-
 cpukit/posix/src/condinit.c                        |   2 +-
 cpukit/posix/src/condtimedwait.c                   |  28 +----
 cpukit/posix/src/condwait.c                        |   3 +-
 cpukit/posix/src/condwaitsupp.c                    |  34 +++++-
 cpukit/posix/src/mqueuerecvsupp.c                  |   2 +-
 cpukit/posix/src/mqueuesendsupp.c                  |   2 +-
 cpukit/posix/src/mqueuetimedreceive.c              |   2 +-
 cpukit/posix/src/mqueuetimedsend.c                 |   2 +-
 cpukit/posix/src/mutexlocksupp.c                   |   4 +-
 cpukit/posix/src/mutextimedlock.c                  |   2 +-
 cpukit/posix/src/nanosleep.c                       |  54 ++++++++--
 cpukit/posix/src/pbarrierwait.c                    |   2 +-
 cpukit/posix/src/prwlockrdlock.c                   |   2 +-
 cpukit/posix/src/prwlocktimedrdlock.c              |   4 +-
 cpukit/posix/src/prwlocktimedwrlock.c              |   4 +-
 cpukit/posix/src/prwlocktryrdlock.c                |   1 -
 cpukit/posix/src/prwlocktrywrlock.c                |   1 -
 cpukit/posix/src/prwlockwrlock.c                   |   2 +-
 cpukit/posix/src/pthreadjoin.c                     |   1 +
 cpukit/posix/src/semaphorewaitsupp.c               |   2 +-
 cpukit/posix/src/semtimedwait.c                    |   2 +-
 cpukit/posix/src/sigtimedwait.c                    |   2 +-
 cpukit/rtems/src/barrierwait.c                     |   2 +-
 cpukit/rtems/src/clocktodtoseconds.c               |   2 +-
 cpukit/rtems/src/msgqreceive.c                     |   2 +-
 cpukit/rtems/src/msgqsend.c                        |   1 -
 cpukit/rtems/src/msgqurgent.c                      |   1 -
 cpukit/rtems/src/regiongetsegment.c                |   1 +
 cpukit/rtems/src/semobtain.c                       |   7 +-
 cpukit/score/include/rtems/score/corebarrierimpl.h |   5 -
 cpukit/score/include/rtems/score/coremsgimpl.h     |  10 --
 cpukit/score/include/rtems/score/coremuteximpl.h   |   8 --
 cpukit/score/include/rtems/score/corerwlockimpl.h  |   6 --
 cpukit/score/include/rtems/score/coresemimpl.h     |   3 -
 cpukit/score/include/rtems/score/mrspimpl.h        |   5 +-
 cpukit/score/include/rtems/score/threadimpl.h      |  11 +-
 cpukit/score/include/rtems/score/threadq.h         |  12 +++
 cpukit/score/include/rtems/score/threadqimpl.h     |  67 ++++++++++--
 cpukit/score/include/rtems/score/todimpl.h         |   2 +
 cpukit/score/include/rtems/score/watchdog.h        |  40 ++++++--
 cpukit/score/include/rtems/score/watchdogimpl.h    |  38 +++----
 cpukit/score/src/apimutexlock.c                    |   3 +-
 cpukit/score/src/condition.c                       |  21 ++--
 cpukit/score/src/corebarrierwait.c                 |   2 -
 cpukit/score/src/coremsgseize.c                    |   2 -
 cpukit/score/src/coremsgsubmit.c                   |   2 -
 cpukit/score/src/coremutexseize.c                  |   5 +-
 cpukit/score/src/corerwlockobtainread.c            |   2 -
 cpukit/score/src/corerwlockobtainwrite.c           |   2 -
 cpukit/score/src/coretodabsolutetimeout.c          |   9 +-
 cpukit/score/src/futex.c                           |   2 +-
 cpukit/score/src/mpci.c                            |   3 +-
 cpukit/score/src/mutex.c                           |  24 ++---
 cpukit/score/src/semaphore.c                       |   2 +-
 cpukit/score/src/threadqenqueue.c                  |  30 ++++--
 cpukit/score/src/threadrestart.c                   |   2 +-
 testsuites/psxtests/psxhdrs/Makefile.am            |   1 +
 testsuites/psxtests/psxhdrs/time/clock_nanosleep.c |  35 +++++++
 testsuites/psxtmtests/Makefile.am                  |   3 +
 testsuites/psxtmtests/configure.ac                 |   3 +
 .../psxtmtests/psxtmclocknanosleep01/Makefile.am   |  25 +++++
 testsuites/psxtmtests/psxtmclocknanosleep01/init.c |  59 +++++++++++
 .../psxtmclocknanosleep01.doc                      |  12 +++
 .../psxtmtests/psxtmclocknanosleep02/Makefile.am   |  25 +++++
 testsuites/psxtmtests/psxtmclocknanosleep02/init.c | 109 ++++++++++++++++++++
 .../psxtmclocknanosleep02.doc                      |  10 ++
 .../psxtmtests/psxtmclocknanosleep03/Makefile.am   |  25 +++++
 testsuites/psxtmtests/psxtmclocknanosleep03/init.c | 114 +++++++++++++++++++++
 .../psxtmclocknanosleep03.doc                      |  10 ++
 72 files changed, 736 insertions(+), 197 deletions(-)
 create mode 100644 testsuites/psxtests/psxhdrs/time/clock_nanosleep.c
 create mode 100644 testsuites/psxtmtests/psxtmclocknanosleep01/Makefile.am
 create mode 100644 testsuites/psxtmtests/psxtmclocknanosleep01/init.c
 create mode 100644 testsuites/psxtmtests/psxtmclocknanosleep01/psxtmclocknanosleep01.doc
 create mode 100644 testsuites/psxtmtests/psxtmclocknanosleep02/Makefile.am
 create mode 100644 testsuites/psxtmtests/psxtmclocknanosleep02/init.c
 create mode 100644 testsuites/psxtmtests/psxtmclocknanosleep02/psxtmclocknanosleep02.doc
 create mode 100644 testsuites/psxtmtests/psxtmclocknanosleep03/Makefile.am
 create mode 100644 testsuites/psxtmtests/psxtmclocknanosleep03/init.c
 create mode 100644 testsuites/psxtmtests/psxtmclocknanosleep03/psxtmclocknanosleep03.doc

-- 
1.9.1



More information about the devel mailing list