diff options
author | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2021-10-11 15:28:47 +0200 |
---|---|---|
committer | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2021-10-12 13:47:37 +0200 |
commit | 7085cb7a4c7abada24dd8398d7cfeac07affa6ef (patch) | |
tree | 44761f5b9bc7fae7d120d8ea892e0fdcf6c2d670 | |
parent | spec: Improve thread wait lock test case (diff) | |
download | rtems-central-7085cb7a4c7abada24dd8398d7cfeac07affa6ef.tar.bz2 |
spec: Add new clock directives
19 files changed, 832 insertions, 0 deletions
diff --git a/spec/c/if/bintime.yml b/spec/c/if/bintime.yml new file mode 100644 index 00000000..25d0eb2a --- /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 00000000..5fa0c172 --- /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 00000000..e45d6579 --- /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 00000000..ef94b3ee --- /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 00000000..b56d10ac --- /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 00000000..f87b6772 --- /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 00000000..b05ccc44 --- /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 00000000..2025f558 --- /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 00000000..c20a2cff --- /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 00000000..1ed2d681 --- /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 00000000..69ccd3a1 --- /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 00000000..5e75e309 --- /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 00000000..ea34be50 --- /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 00000000..0b0e09d3 --- /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 00000000..a2cbcce0 --- /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 00000000..4edc4422 --- /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 00000000..625c8b11 --- /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 00000000..77d53dbf --- /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 67e4f58f..cec2efc0 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 |