[rtems-central commit] spec: Add new clock directives

Sebastian Huber sebh at rtems.org
Wed Oct 13 07:58:20 UTC 2021


Module:    rtems-central
Branch:    master
Commit:    7085cb7a4c7abada24dd8398d7cfeac07affa6ef
Changeset: http://git.rtems.org/rtems-central/commit/?id=7085cb7a4c7abada24dd8398d7cfeac07affa6ef

Author:    Sebastian Huber <sebastian.huber at embedded-brains.de>
Date:      Mon Oct 11 15:28:47 2021 +0200

spec: Add new clock directives

---

 spec/c/if/bintime.yml                              | 16 +++++++
 spec/rtems/clock/if/bintime.yml                    | 12 ++++++
 spec/rtems/clock/if/get-boot-time-bintime.yml      | 43 +++++++++++++++++++
 spec/rtems/clock/if/get-boot-time-timeval.yml      | 43 +++++++++++++++++++
 spec/rtems/clock/if/get-boot-time.yml              | 43 +++++++++++++++++++
 spec/rtems/clock/if/get-monotonic-bintime.yml      | 50 ++++++++++++++++++++++
 .../clock/if/get-monotonic-coarse-bintime.yml      | 50 ++++++++++++++++++++++
 .../clock/if/get-monotonic-coarse-timeval.yml      | 50 ++++++++++++++++++++++
 spec/rtems/clock/if/get-monotonic-coarse.yml       | 50 ++++++++++++++++++++++
 spec/rtems/clock/if/get-monotonic-sbintime.yml     | 44 +++++++++++++++++++
 spec/rtems/clock/if/get-monotonic-timeval.yml      | 50 ++++++++++++++++++++++
 spec/rtems/clock/if/get-monotonic.yml              | 50 ++++++++++++++++++++++
 spec/rtems/clock/if/get-realtime-bintime.yml       | 50 ++++++++++++++++++++++
 .../rtems/clock/if/get-realtime-coarse-bintime.yml | 49 +++++++++++++++++++++
 .../rtems/clock/if/get-realtime-coarse-timeval.yml | 50 ++++++++++++++++++++++
 spec/rtems/clock/if/get-realtime-coarse.yml        | 50 ++++++++++++++++++++++
 spec/rtems/clock/if/get-realtime-timeval.yml       | 50 ++++++++++++++++++++++
 spec/rtems/clock/if/get-realtime.yml               | 50 ++++++++++++++++++++++
 spec/rtems/clock/if/group.yml                      | 32 ++++++++++++++
 19 files changed, 832 insertions(+)

diff --git a/spec/c/if/bintime.yml b/spec/c/if/bintime.yml
new file mode 100644
index 0000000..25d0eb2
--- /dev/null
+++ b/spec/c/if/bintime.yml
@@ -0,0 +1,16 @@
+brief: |
+  This structure represents time in a binary fraction format.
+copyrights:
+- Copyright (C) 2021 embedded brains GmbH (http://www.embedded-brains.de)
+definition: []
+definition-kind: struct-only
+description: null
+enabled-by: true
+index-entries: []
+interface-type: struct
+links:
+- role: interface-placement
+  uid: time
+name: bintime
+notes: null
+type: interface
diff --git a/spec/rtems/clock/if/bintime.yml b/spec/rtems/clock/if/bintime.yml
new file mode 100644
index 0000000..5fa0c17
--- /dev/null
+++ b/spec/rtems/clock/if/bintime.yml
@@ -0,0 +1,12 @@
+SPDX-License-Identifier: CC-BY-SA-4.0 OR BSD-2-Clause
+copyrights:
+- Copyright (C) 2021 embedded brains GmbH (http://www.embedded-brains.de)
+enabled-by: true
+index-entries: []
+interface-type: forward-declaration
+links:
+- role: interface-placement
+  uid: header
+- role: interface-target
+  uid: /c/if/bintime
+type: interface
diff --git a/spec/rtems/clock/if/get-boot-time-bintime.yml b/spec/rtems/clock/if/get-boot-time-bintime.yml
new file mode 100644
index 0000000..e45d657
--- /dev/null
+++ b/spec/rtems/clock/if/get-boot-time-bintime.yml
@@ -0,0 +1,43 @@
+SPDX-License-Identifier: CC-BY-SA-4.0 OR BSD-2-Clause
+brief: |
+  Gets a time point during system initialization used by
+  ${/glossary/clock-realtime:/term} in binary time format.
+copyrights:
+- Copyright (C) 2021 embedded brains GmbH (http://www.embedded-brains.de)
+definition:
+  default:
+    attributes: null
+    body: null
+    params:
+    - ${bintime:/name} *${.:/params[0]/name}
+    return: void
+  variants: []
+description: null
+enabled-by: true
+index-entries: []
+interface-type: function
+links:
+- role: interface-placement
+  uid: header
+- role: interface-ingroup
+  uid: group
+- role: constraint
+  uid: /constraint/directive-ctx-any
+- role: constraint
+  uid: /constraint/directive-no-preempt
+- role: constraint
+  uid: /constraint/clock-driver
+name: rtems_clock_get_boot_time_bintime
+notes: |
+  See ${get-boot-time:/name} and ${get-boot-time-timeval:/name} to get the boot
+  time in alternative formats.
+params:
+- description: |
+    is the pointer to a ${/c/if/bintime:/name} object.  A time point during
+    system initialization used by ${/glossary/clock-realtime:/term} will be
+    stored in this object.  Calling the directive with a pointer equal to
+    ${/c/if/null:/name} is undefined behaviour.
+  dir: out
+  name: boot_time
+return: null
+type: interface
diff --git a/spec/rtems/clock/if/get-boot-time-timeval.yml b/spec/rtems/clock/if/get-boot-time-timeval.yml
new file mode 100644
index 0000000..ef94b3e
--- /dev/null
+++ b/spec/rtems/clock/if/get-boot-time-timeval.yml
@@ -0,0 +1,43 @@
+SPDX-License-Identifier: CC-BY-SA-4.0 OR BSD-2-Clause
+brief: |
+  Gets a time point during system initialization used by
+  ${/glossary/clock-realtime:/term} in seconds and microseconds format.
+copyrights:
+- Copyright (C) 2021 embedded brains GmbH (http://www.embedded-brains.de)
+definition:
+  default:
+    attributes: null
+    body: null
+    params:
+    - ${/c/if/timeval:/name} *${.:/params[0]/name}
+    return: void
+  variants: []
+description: null
+enabled-by: true
+index-entries: []
+interface-type: function
+links:
+- role: interface-placement
+  uid: header
+- role: interface-ingroup
+  uid: group
+- role: constraint
+  uid: /constraint/directive-ctx-any
+- role: constraint
+  uid: /constraint/directive-no-preempt
+- role: constraint
+  uid: /constraint/clock-driver
+name: rtems_clock_get_boot_time_timeval
+notes: |
+  See ${get-boot-time:/name} and ${get-boot-time-bintime:/name} to get the boot
+  time in alternative formats.
+params:
+- description: |
+    is the pointer to a ${/c/if/timeval:/name} object.  A time point during
+    system initialization used by ${/glossary/clock-realtime:/term} will be
+    stored in this object.  Calling the directive with a pointer equal to
+    ${/c/if/null:/name} is undefined behaviour.
+  dir: out
+  name: boot_time
+return: null
+type: interface
diff --git a/spec/rtems/clock/if/get-boot-time.yml b/spec/rtems/clock/if/get-boot-time.yml
new file mode 100644
index 0000000..b56d10a
--- /dev/null
+++ b/spec/rtems/clock/if/get-boot-time.yml
@@ -0,0 +1,43 @@
+SPDX-License-Identifier: CC-BY-SA-4.0 OR BSD-2-Clause
+brief: |
+  Gets a time point during system initialization used by
+  ${/glossary/clock-realtime:/term} in seconds and nanoseconds format.
+copyrights:
+- Copyright (C) 2021 embedded brains GmbH (http://www.embedded-brains.de)
+definition:
+  default:
+    attributes: null
+    body: null
+    params:
+    - ${/c/if/timespec:/name} *${.:/params[0]/name}
+    return: void
+  variants: []
+description: null
+enabled-by: true
+index-entries: []
+interface-type: function
+links:
+- role: interface-placement
+  uid: header
+- role: interface-ingroup
+  uid: group
+- role: constraint
+  uid: /constraint/directive-ctx-any
+- role: constraint
+  uid: /constraint/directive-no-preempt
+- role: constraint
+  uid: /constraint/clock-driver
+name: rtems_clock_get_boot_time
+notes: |
+  See ${get-boot-time-bintime:/name} and ${get-boot-time-timeval:/name} to get
+  the boot time in alternative formats.
+params:
+- description: |
+    is the pointer to a ${/c/if/timespec:/name} object.  A time point during
+    system initialization used by ${/glossary/clock-realtime:/term} will be
+    stored in this object.  Calling the directive with a pointer equal to
+    ${/c/if/null:/name} is undefined behaviour.
+  dir: out
+  name: boot_time
+return: null
+type: interface
diff --git a/spec/rtems/clock/if/get-monotonic-bintime.yml b/spec/rtems/clock/if/get-monotonic-bintime.yml
new file mode 100644
index 0000000..f87b677
--- /dev/null
+++ b/spec/rtems/clock/if/get-monotonic-bintime.yml
@@ -0,0 +1,50 @@
+SPDX-License-Identifier: CC-BY-SA-4.0 OR BSD-2-Clause
+brief: |
+  Gets the time elapsed since some fixed time point in the past measured using
+  the ${/glossary/clock-monotonic:/term} in binary time format.
+copyrights:
+- Copyright (C) 2021 embedded brains GmbH (http://www.embedded-brains.de)
+definition:
+  default:
+    attributes: null
+    body: null
+    params:
+    - ${bintime:/name} *${.:/params[0]/name}
+    return: void
+  variants: []
+description: null
+enabled-by: true
+index-entries: []
+interface-type: function
+links:
+- role: interface-placement
+  uid: header
+- role: interface-ingroup
+  uid: group
+- role: constraint
+  uid: /constraint/directive-ctx-any
+- role: constraint
+  uid: /constraint/directive-no-preempt
+- role: constraint
+  uid: /constraint/clock-driver
+name: rtems_clock_get_monotonic_bintime
+notes: |
+  The directive accesses a device provided by the
+  ${/glossary/clock-driver:/term} to get the time in the highest precision
+  available to the system.  Alternatively, the
+  ${get-monotonic-coarse-bintime:/name} directive may be used to get the time
+  with less presision and less runtime overhead.
+
+  See ${get-monotonic:/name}, ${get-monotonic-sbintime:/name}, and
+  ${get-monotonic-timeval:/name} to get the time in alternative formats.
+params:
+- description: |
+    is the pointer to a ${/c/if/bintime:/name} object.  The time elapsed since
+    some fixed time point in the past measured using the
+    ${/glossary/clock-monotonic:/term} at some time point during the directive
+    call will be stored in this object.  Calling the directive with a pointer
+    equal to ${/c/if/null:/name} is undefined behaviour.
+  dir: out
+  name: time_snapshot
+return: null
+type: interface
diff --git a/spec/rtems/clock/if/get-monotonic-coarse-bintime.yml b/spec/rtems/clock/if/get-monotonic-coarse-bintime.yml
new file mode 100644
index 0000000..b05ccc4
--- /dev/null
+++ b/spec/rtems/clock/if/get-monotonic-coarse-bintime.yml
@@ -0,0 +1,50 @@
+SPDX-License-Identifier: CC-BY-SA-4.0 OR BSD-2-Clause
+brief: |
+  Gets the time elapsed since some fixed time point in the past measured using
+  the ${/glossary/clock-monotonic:/term} in coarse precision in binary time
+  format.
+copyrights:
+- Copyright (C) 2021 embedded brains GmbH (http://www.embedded-brains.de)
+definition:
+  default:
+    attributes: null
+    body: null
+    params:
+    - ${bintime:/name} *${.:/params[0]/name}
+    return: void
+  variants: []
+description: null
+enabled-by: true
+index-entries: []
+interface-type: function
+links:
+- role: interface-placement
+  uid: header
+- role: interface-ingroup
+  uid: group
+- role: constraint
+  uid: /constraint/directive-ctx-any
+- role: constraint
+  uid: /constraint/directive-no-preempt
+- role: constraint
+  uid: /constraint/clock-driver
+name: rtems_clock_get_monotonic_coarse_bintime
+notes: |
+  The directive does not access a device to get the time.  It uses a recent
+  snapshot provided by the ${/glossary/clock-driver:/term}.  Alternatively, the
+  ${get-monotonic-bintime:/name} directive may be used to get the time with
+  higher presision and higher runtime overhead.
+
+  See ${get-monotonic-coarse:/name} and ${get-monotonic-coarse-timeval:/name}
+  to get the time in alternative formats.
+params:
+- description: |
+    is the pointer to a ${/c/if/bintime:/name} object.  The time elapsed since
+    some fixed time point in the past measured using the
+    ${/glossary/clock-monotonic:/term} at some time point close to the
+    directive call will be stored in this object.  Calling the directive with a
+    pointer equal to ${/c/if/null:/name} is undefined behaviour.
+  dir: out
+  name: time_snapshot
+return: null
+type: interface
diff --git a/spec/rtems/clock/if/get-monotonic-coarse-timeval.yml b/spec/rtems/clock/if/get-monotonic-coarse-timeval.yml
new file mode 100644
index 0000000..2025f55
--- /dev/null
+++ b/spec/rtems/clock/if/get-monotonic-coarse-timeval.yml
@@ -0,0 +1,50 @@
+SPDX-License-Identifier: CC-BY-SA-4.0 OR BSD-2-Clause
+brief: |
+  Gets the time elapsed since some fixed time point in the past measured using
+  the ${/glossary/clock-monotonic:/term} in coarse precision in seconds and
+  microseconds format.
+copyrights:
+- Copyright (C) 2021 embedded brains GmbH (http://www.embedded-brains.de)
+definition:
+  default:
+    attributes: null
+    body: null
+    params:
+    - ${/c/if/timeval:/name} *${.:/params[0]/name}
+    return: void
+  variants: []
+description: null
+enabled-by: true
+index-entries: []
+interface-type: function
+links:
+- role: interface-placement
+  uid: header
+- role: interface-ingroup
+  uid: group
+- role: constraint
+  uid: /constraint/directive-ctx-any
+- role: constraint
+  uid: /constraint/directive-no-preempt
+- role: constraint
+  uid: /constraint/clock-driver
+name: rtems_clock_get_monotonic_coarse_timeval
+notes: |
+  The directive does not access a device to get the time.  It uses a recent
+  snapshot provided by the ${/glossary/clock-driver:/term}.  Alternatively, the
+  ${get-monotonic-timeval:/name} directive may be used to get the time with
+  higher presision and higher runtime overhead.
+
+  See ${get-monotonic-coarse:/name} and ${get-monotonic-coarse-bintime:/name}
+  to get the time in alternative formats.
+params:
+- description: |
+    is the pointer to a ${/c/if/bintime:/name} object.  The time elapsed since
+    some fixed time point in the past measured using the
+    ${/glossary/clock-monotonic:/term} at some time point close to the
+    directive call will be stored in this object.  Calling the directive with a
+    pointer equal to ${/c/if/null:/name} is undefined behaviour.
+  dir: out
+  name: time_snapshot
+return: null
+type: interface
diff --git a/spec/rtems/clock/if/get-monotonic-coarse.yml b/spec/rtems/clock/if/get-monotonic-coarse.yml
new file mode 100644
index 0000000..c20a2cf
--- /dev/null
+++ b/spec/rtems/clock/if/get-monotonic-coarse.yml
@@ -0,0 +1,50 @@
+SPDX-License-Identifier: CC-BY-SA-4.0 OR BSD-2-Clause
+brief: |
+  Gets the time elapsed since some fixed time point in the past measured using
+  the ${/glossary/clock-monotonic:/term} in coarse precision in seconds and
+  nanoseconds format.
+copyrights:
+- Copyright (C) 2021 embedded brains GmbH (http://www.embedded-brains.de)
+definition:
+  default:
+    attributes: null
+    body: null
+    params:
+    - ${/c/if/timespec:/name} *${.:/params[0]/name}
+    return: void
+  variants: []
+description: null
+enabled-by: true
+index-entries: []
+interface-type: function
+links:
+- role: interface-placement
+  uid: header
+- role: interface-ingroup
+  uid: group
+- role: constraint
+  uid: /constraint/directive-ctx-any
+- role: constraint
+  uid: /constraint/directive-no-preempt
+- role: constraint
+  uid: /constraint/clock-driver
+name: rtems_clock_get_monotonic_coarse
+notes: |
+  The directive does not access a device to get the time.  It uses a recent
+  snapshot provided by the ${/glossary/clock-driver:/term}.  Alternatively, the
+  ${get-monotonic:/name} directive may be used to get the time with higher
+  presision and higher runtime overhead.
+
+  See ${get-monotonic-coarse-bintime:/name} and
+  ${get-monotonic-coarse-timeval:/name} to get the time in alternative formats.
+params:
+- description: |
+    is the pointer to a ${/c/if/bintime:/name} object.  The time elapsed since
+    some fixed time point in the past measured using the
+    ${/glossary/clock-monotonic:/term} at some time point close to the
+    directive call will be stored in this object.  Calling the directive with a
+    pointer equal to ${/c/if/null:/name} is undefined behaviour.
+  dir: out
+  name: time_snapshot
+return: null
+type: interface
diff --git a/spec/rtems/clock/if/get-monotonic-sbintime.yml b/spec/rtems/clock/if/get-monotonic-sbintime.yml
new file mode 100644
index 0000000..1ed2d68
--- /dev/null
+++ b/spec/rtems/clock/if/get-monotonic-sbintime.yml
@@ -0,0 +1,44 @@
+SPDX-License-Identifier: CC-BY-SA-4.0 OR BSD-2-Clause
+brief: |
+  Gets the time elapsed since some fixed time point in the past measured using
+  the ${/glossary/clock-monotonic:/term} in signed binary time format.
+copyrights:
+- Copyright (C) 2021 embedded brains GmbH (http://www.embedded-brains.de)
+definition:
+  default:
+    attributes: null
+    body: null
+    params: []
+    return: ${/c/if/int64_t:/name}
+  variants: []
+description: null
+enabled-by: true
+index-entries: []
+interface-type: function
+links:
+- role: interface-placement
+  uid: header
+- role: interface-ingroup
+  uid: group
+- role: constraint
+  uid: /constraint/directive-ctx-any
+- role: constraint
+  uid: /constraint/directive-no-preempt
+- role: constraint
+  uid: /constraint/clock-driver
+name: rtems_clock_get_monotonic_sbintime
+notes: |
+  The directive accesses a device provided by the
+  ${/glossary/clock-driver:/term} to get the time in the highest precision
+  available to the system.
+
+  See ${get-monotonic:/name}, ${get-monotonic-bintime:/name}, and
+  ${get-monotonic-timeval:/name} to get the time in alternative formats.
+params: []
+return:
+  return: |
+    Returns the time elapsed since some fixed time point in the past
+    measured using the ${/glossary/clock-monotonic:/term} at some time point
+    during the directive call.
+  return-values: []
+type: interface
diff --git a/spec/rtems/clock/if/get-monotonic-timeval.yml b/spec/rtems/clock/if/get-monotonic-timeval.yml
new file mode 100644
index 0000000..69ccd3a
--- /dev/null
+++ b/spec/rtems/clock/if/get-monotonic-timeval.yml
@@ -0,0 +1,50 @@
+SPDX-License-Identifier: CC-BY-SA-4.0 OR BSD-2-Clause
+brief: |
+  Gets the time elapsed since some fixed time point in the past measured using
+  the ${/glossary/clock-monotonic:/term} in seconds and microseconds format.
+copyrights:
+- Copyright (C) 2021 embedded brains GmbH (http://www.embedded-brains.de)
+definition:
+  default:
+    attributes: null
+    body: null
+    params:
+    - ${/c/if/timeval:/name} *${.:/params[0]/name}
+    return: void
+  variants: []
+description: null
+enabled-by: true
+index-entries: []
+interface-type: function
+links:
+- role: interface-placement
+  uid: header
+- role: interface-ingroup
+  uid: group
+- role: constraint
+  uid: /constraint/directive-ctx-any
+- role: constraint
+  uid: /constraint/directive-no-preempt
+- role: constraint
+  uid: /constraint/clock-driver
+name: rtems_clock_get_monotonic_timeval
+notes: |
+  The directive accesses a device provided by the
+  ${/glossary/clock-driver:/term} to get the time in the highest precision
+  available to the system.  Alternatively, the
+  ${get-monotonic-coarse-timeval:/name} directive may be used to get the time
+  with less presision and less runtime overhead.
+
+  See ${get-monotonic:/name}, ${get-monotonic-bintime:/name}, and
+  ${get-monotonic-sbintime:/name} to get the time in alternative formats.
+params:
+- description: |
+    is the pointer to a ${/c/if/bintime:/name} object.  The time elapsed since
+    some fixed time point in the past measured using the
+    ${/glossary/clock-monotonic:/term} at some time point during the directive
+    call will be stored in this object.  Calling the directive with a pointer
+    equal to ${/c/if/null:/name} is undefined behaviour.
+  dir: out
+  name: time_snapshot
+return: null
+type: interface
diff --git a/spec/rtems/clock/if/get-monotonic.yml b/spec/rtems/clock/if/get-monotonic.yml
new file mode 100644
index 0000000..5e75e30
--- /dev/null
+++ b/spec/rtems/clock/if/get-monotonic.yml
@@ -0,0 +1,50 @@
+SPDX-License-Identifier: CC-BY-SA-4.0 OR BSD-2-Clause
+brief: |
+  Gets the time elapsed since some fixed time point in the past measured using
+  the ${/glossary/clock-monotonic:/term} in seconds and nanoseconds format.
+copyrights:
+- Copyright (C) 2021 embedded brains GmbH (http://www.embedded-brains.de)
+definition:
+  default:
+    attributes: null
+    body: null
+    params:
+    - ${/c/if/timespec:/name} *${.:/params[0]/name}
+    return: void
+  variants: []
+description: null
+enabled-by: true
+index-entries: []
+interface-type: function
+links:
+- role: interface-placement
+  uid: header
+- role: interface-ingroup
+  uid: group
+- role: constraint
+  uid: /constraint/directive-ctx-any
+- role: constraint
+  uid: /constraint/directive-no-preempt
+- role: constraint
+  uid: /constraint/clock-driver
+name: rtems_clock_get_monotonic
+notes: |
+  The directive accesses a device provided by the
+  ${/glossary/clock-driver:/term} to get the time in the highest precision
+  available to the system.  Alternatively, the
+  ${get-monotonic-coarse:/name} directive may be used to get the time with less
+  presision and less runtime overhead.
+
+  See ${get-monotonic-bintime:/name}, ${get-monotonic-sbintime:/name}, and
+  ${get-monotonic-timeval:/name} to get the time in alternative formats.
+params:
+- description: |
+    is the pointer to a ${/c/if/bintime:/name} object.  The time elapsed since
+    some fixed time point in the past measured using the
+    ${/glossary/clock-monotonic:/term} at some time point during the directive
+    call will be stored in this object.  Calling the directive with a pointer
+    equal to ${/c/if/null:/name} is undefined behaviour.
+  dir: out
+  name: time_snapshot
+return: null
+type: interface
diff --git a/spec/rtems/clock/if/get-realtime-bintime.yml b/spec/rtems/clock/if/get-realtime-bintime.yml
new file mode 100644
index 0000000..ea34be5
--- /dev/null
+++ b/spec/rtems/clock/if/get-realtime-bintime.yml
@@ -0,0 +1,50 @@
+SPDX-License-Identifier: CC-BY-SA-4.0 OR BSD-2-Clause
+brief: |
+  Gets the time elapsed since the ${/glossary/unix-epoch:/term} measured using
+  ${/glossary/clock-realtime:/term} in binary time format.
+copyrights:
+- Copyright (C) 2021 embedded brains GmbH (http://www.embedded-brains.de)
+definition:
+  default:
+    attributes: null
+    body: null
+    params:
+    - ${bintime:/name} *${.:/params[0]/name}
+    return: void
+  variants: []
+description: null
+enabled-by: true
+index-entries: []
+interface-type: function
+links:
+- role: interface-placement
+  uid: header
+- role: interface-ingroup
+  uid: group
+- role: constraint
+  uid: /constraint/directive-ctx-any
+- role: constraint
+  uid: /constraint/directive-no-preempt
+- role: constraint
+  uid: /constraint/clock-driver
+name: rtems_clock_get_realtime_bintime
+notes: |
+  The directive accesses a device provided by the
+  ${/glossary/clock-driver:/term} to get the time in the highest precision
+  available to the system.  Alternatively, the
+  ${get-realtime-coarse-bintime:/name} directive may be used to get the time
+  with less presision and less runtime overhead.
+
+  See ${get-realtime:/name} and ${get-realtime-timeval:/name} to get the time
+  in alternative formats.
+params:
+- description: |
+    is the pointer to a ${/c/if/bintime:/name} object.  The time elapsed since
+    the ${/glossary/unix-epoch:/term} measured using the
+    ${/glossary/clock-realtime:/term} at some time point during the directive
+    call will be stored in this object.  Calling the directive with a pointer
+    equal to ${/c/if/null:/name} is undefined behaviour.
+  dir: out
+  name: time_snapshot
+return: null
+type: interface
diff --git a/spec/rtems/clock/if/get-realtime-coarse-bintime.yml b/spec/rtems/clock/if/get-realtime-coarse-bintime.yml
new file mode 100644
index 0000000..0b0e09d
--- /dev/null
+++ b/spec/rtems/clock/if/get-realtime-coarse-bintime.yml
@@ -0,0 +1,49 @@
+SPDX-License-Identifier: CC-BY-SA-4.0 OR BSD-2-Clause
+brief: |
+  Gets the time elapsed since the ${/glossary/unix-epoch:/term} measured using
+  ${/glossary/clock-realtime:/term} in coarse precision in binary time format.
+copyrights:
+- Copyright (C) 2021 embedded brains GmbH (http://www.embedded-brains.de)
+definition:
+  default:
+    attributes: null
+    body: null
+    params:
+    - ${bintime:/name} *${.:/params[0]/name}
+    return: void
+  variants: []
+description: null
+enabled-by: true
+index-entries: []
+interface-type: function
+links:
+- role: interface-placement
+  uid: header
+- role: interface-ingroup
+  uid: group
+- role: constraint
+  uid: /constraint/directive-ctx-any
+- role: constraint
+  uid: /constraint/directive-no-preempt
+- role: constraint
+  uid: /constraint/clock-driver
+name: rtems_clock_get_realtime_coarse_bintime
+notes: |
+  The directive does not access a device to get the time.  It uses a recent
+  snapshot provided by the ${/glossary/clock-driver:/term}.  Alternatively, the
+  ${get-realtime-bintime:/name} directive may be used to get the time with
+  higher presision and higher runtime overhead.
+
+  See ${get-realtime-coarse:/name} and ${get-realtime-coarse-timeval:/name} to
+  get the time in alternative formats.
+params:
+- description: |
+    is the pointer to a ${/c/if/bintime:/name} object.  The time elapsed since
+    the ${/glossary/unix-epoch:/term} measured using the
+    ${/glossary/clock-realtime:/term} at some time point close to the directive
+    call will be stored in this object.  Calling the directive with a pointer
+    equal to ${/c/if/null:/name} is undefined behaviour.
+  dir: out
+  name: time_snapshot
+return: null
+type: interface
diff --git a/spec/rtems/clock/if/get-realtime-coarse-timeval.yml b/spec/rtems/clock/if/get-realtime-coarse-timeval.yml
new file mode 100644
index 0000000..a2cbcce
--- /dev/null
+++ b/spec/rtems/clock/if/get-realtime-coarse-timeval.yml
@@ -0,0 +1,50 @@
+SPDX-License-Identifier: CC-BY-SA-4.0 OR BSD-2-Clause
+brief: |
+  Gets the time elapsed since the ${/glossary/unix-epoch:/term} measured using
+  ${/glossary/clock-realtime:/term} in coarse precision in seconds and
+  microseconds format.
+copyrights:
+- Copyright (C) 2021 embedded brains GmbH (http://www.embedded-brains.de)
+definition:
+  default:
+    attributes: null
+    body: null
+    params:
+    - ${/c/if/timeval:/name} *${.:/params[0]/name}
+    return: void
+  variants: []
+description: null
+enabled-by: true
+index-entries: []
+interface-type: function
+links:
+- role: interface-placement
+  uid: header
+- role: interface-ingroup
+  uid: group
+- role: constraint
+  uid: /constraint/directive-ctx-any
+- role: constraint
+  uid: /constraint/directive-no-preempt
+- role: constraint
+  uid: /constraint/clock-driver
+name: rtems_clock_get_realtime_coarse_timeval
+notes: |
+  The directive does not access a device to get the time.  It uses a recent
+  snapshot provided by the ${/glossary/clock-driver:/term}.  Alternatively, the
+  ${get-realtime-timeval:/name} directive may be used to get the time with
+  higher presision and higher runtime overhead.
+
+  See ${get-realtime-coarse:/name} and ${get-realtime-coarse-timeval:/name} to
+  get the time in alternative formats.
+params:
+- description: |
+    is the pointer to a ${/c/if/timeval:/name} object.  The time elapsed since
+    the ${/glossary/unix-epoch:/term} measured using the
+    ${/glossary/clock-realtime:/term} at some time point close to the directive
+    call will be stored in this object.  Calling the directive with a pointer
+    equal to ${/c/if/null:/name} is undefined behaviour.
+  dir: out
+  name: time_snapshot
+return: null
+type: interface
diff --git a/spec/rtems/clock/if/get-realtime-coarse.yml b/spec/rtems/clock/if/get-realtime-coarse.yml
new file mode 100644
index 0000000..4edc442
--- /dev/null
+++ b/spec/rtems/clock/if/get-realtime-coarse.yml
@@ -0,0 +1,50 @@
+SPDX-License-Identifier: CC-BY-SA-4.0 OR BSD-2-Clause
+brief: |
+  Gets the time elapsed since the ${/glossary/unix-epoch:/term} measured using
+  ${/glossary/clock-realtime:/term} in coarse precision in seconds and
+  nanoseconds format.
+copyrights:
+- Copyright (C) 2021 embedded brains GmbH (http://www.embedded-brains.de)
+definition:
+  default:
+    attributes: null
+    body: null
+    params:
+    - ${/c/if/timespec:/name} *${.:/params[0]/name}
+    return: void
+  variants: []
+description: null
+enabled-by: true
+index-entries: []
+interface-type: function
+links:
+- role: interface-placement
+  uid: header
+- role: interface-ingroup
+  uid: group
+- role: constraint
+  uid: /constraint/directive-ctx-any
+- role: constraint
+  uid: /constraint/directive-no-preempt
+- role: constraint
+  uid: /constraint/clock-driver
+name: rtems_clock_get_realtime_coarse
+notes: |
+  The directive does not access a device to get the time.  It uses a recent
+  snapshot provided by the ${/glossary/clock-driver:/term}.  Alternatively, the
+  ${get-realtime:/name} directive may be used to get the time with
+  higher presision and higher runtime overhead.
+
+  See ${get-realtime-coarse-bintime:/name} and
+  ${get-realtime-coarse-timeval:/name} to get the time in alternative formats.
+params:
+- description: |
+    is the pointer to a ${/c/if/timespec:/name} object.  The time elapsed since
+    the ${/glossary/unix-epoch:/term} measured using the
+    ${/glossary/clock-realtime:/term} at some time point close to the directive
+    call will be stored in this object.  Calling the directive with a pointer
+    equal to ${/c/if/null:/name} is undefined behaviour.
+  dir: out
+  name: time_snapshot
+return: null
+type: interface
diff --git a/spec/rtems/clock/if/get-realtime-timeval.yml b/spec/rtems/clock/if/get-realtime-timeval.yml
new file mode 100644
index 0000000..625c8b1
--- /dev/null
+++ b/spec/rtems/clock/if/get-realtime-timeval.yml
@@ -0,0 +1,50 @@
+SPDX-License-Identifier: CC-BY-SA-4.0 OR BSD-2-Clause
+brief: |
+  Gets the time elapsed since the ${/glossary/unix-epoch:/term} measured using
+  ${/glossary/clock-realtime:/term} in seconds and microseconds format.
+copyrights:
+- Copyright (C) 2021 embedded brains GmbH (http://www.embedded-brains.de)
+definition:
+  default:
+    attributes: null
+    body: null
+    params:
+    - ${/c/if/timeval:/name} *${.:/params[0]/name}
+    return: void
+  variants: []
+description: null
+enabled-by: true
+index-entries: []
+interface-type: function
+links:
+- role: interface-placement
+  uid: header
+- role: interface-ingroup
+  uid: group
+- role: constraint
+  uid: /constraint/directive-ctx-any
+- role: constraint
+  uid: /constraint/directive-no-preempt
+- role: constraint
+  uid: /constraint/clock-driver
+name: rtems_clock_get_realtime_timeval
+notes: |
+  The directive accesses a device provided by the
+  ${/glossary/clock-driver:/term} to get the time in the highest precision
+  available to the system.  Alternatively, the
+  ${get-realtime-coarse-timeval:/name} directive may be used to get the time
+  with less presision and less runtime overhead.
+
+  See ${get-realtime:/name} and ${get-realtime-bintime:/name} to get the time
+  in alternative formats.
+params:
+- description: |
+    is the pointer to a ${/c/if/timeval:/name} object.  The time elapsed since
+    the ${/glossary/unix-epoch:/term} measured using the
+    ${/glossary/clock-realtime:/term} at some time point during the directive
+    call will be stored in this object.  Calling the directive with a pointer
+    equal to ${/c/if/null:/name} is undefined behaviour.
+  dir: out
+  name: time_snapshot
+return: null
+type: interface
diff --git a/spec/rtems/clock/if/get-realtime.yml b/spec/rtems/clock/if/get-realtime.yml
new file mode 100644
index 0000000..77d53db
--- /dev/null
+++ b/spec/rtems/clock/if/get-realtime.yml
@@ -0,0 +1,50 @@
+SPDX-License-Identifier: CC-BY-SA-4.0 OR BSD-2-Clause
+brief: |
+  Gets the time elapsed since the ${/glossary/unix-epoch:/term} measured using
+  ${/glossary/clock-realtime:/term} in seconds and nanoseconds format.
+copyrights:
+- Copyright (C) 2021 embedded brains GmbH (http://www.embedded-brains.de)
+definition:
+  default:
+    attributes: null
+    body: null
+    params:
+    - ${/c/if/timespec:/name} *${.:/params[0]/name}
+    return: void
+  variants: []
+description: null
+enabled-by: true
+index-entries: []
+interface-type: function
+links:
+- role: interface-placement
+  uid: header
+- role: interface-ingroup
+  uid: group
+- role: constraint
+  uid: /constraint/directive-ctx-any
+- role: constraint
+  uid: /constraint/directive-no-preempt
+- role: constraint
+  uid: /constraint/clock-driver
+name: rtems_clock_get_realtime
+notes: |
+  The directive accesses a device provided by the
+  ${/glossary/clock-driver:/term} to get the time in the highest precision
+  available to the system.  Alternatively, the
+  ${get-realtime-coarse:/name} directive may be used to get the time with less
+  presision and less runtime overhead.
+
+  See ${get-realtime-bintime:/name} and ${get-realtime-timeval:/name} to get
+  the time in alternative formats.
+params:
+- description: |
+    is the pointer to a ${/c/if/timespec:/name} object.  The time elapsed since
+    the ${/glossary/unix-epoch:/term} measured using the
+    ${/glossary/clock-realtime:/term} at some time point during the directive
+    call will be stored in this object.  Calling the directive with a pointer
+    equal to ${/c/if/null:/name} is undefined behaviour.
+  dir: out
+  name: time_snapshot
+return: null
+type: interface
diff --git a/spec/rtems/clock/if/group.yml b/spec/rtems/clock/if/group.yml
index 67e4f58..cec2efc 100644
--- a/spec/rtems/clock/if/group.yml
+++ b/spec/rtems/clock/if/group.yml
@@ -22,6 +22,38 @@ links:
 - role: placement-order
   uid: get-tod-timeval
 - role: placement-order
+  uid: get-realtime
+- role: placement-order
+  uid: get-realtime-bintime
+- role: placement-order
+  uid: get-realtime-timeval
+- role: placement-order
+  uid: get-realtime-coarse
+- role: placement-order
+  uid: get-realtime-coarse-bintime
+- role: placement-order
+  uid: get-realtime-coarse-timeval
+- role: placement-order
+  uid: get-monotonic
+- role: placement-order
+  uid: get-monotonic-bintime
+- role: placement-order
+  uid: get-monotonic-sbintime
+- role: placement-order
+  uid: get-monotonic-timeval
+- role: placement-order
+  uid: get-monotonic-coarse
+- role: placement-order
+  uid: get-monotonic-coarse-bintime
+- role: placement-order
+  uid: get-monotonic-coarse-timeval
+- role: placement-order
+  uid: get-boot-time
+- role: placement-order
+  uid: get-boot-time-bintime
+- role: placement-order
+  uid: get-boot-time-timeval
+- role: placement-order
   uid: get-seconds-since-epoch
 - role: placement-order
   uid: get-ticks-per-second



More information about the vc mailing list