diff options
Diffstat (limited to 'spec/rtems/scheduler/if')
-rw-r--r-- | spec/rtems/scheduler/if/add-processor.yml | 52 | ||||
-rw-r--r-- | spec/rtems/scheduler/if/get-maximum-priority.yml | 46 | ||||
-rw-r--r-- | spec/rtems/scheduler/if/get-processor-maximum.yml | 33 | ||||
-rw-r--r-- | spec/rtems/scheduler/if/get-processor-set.yml | 58 | ||||
-rw-r--r-- | spec/rtems/scheduler/if/get-processor.yml | 35 | ||||
-rw-r--r-- | spec/rtems/scheduler/if/ident-by-processor-set.yml | 63 | ||||
-rw-r--r-- | spec/rtems/scheduler/if/ident-by-processor.yml | 51 | ||||
-rw-r--r-- | spec/rtems/scheduler/if/ident.yml | 47 | ||||
-rw-r--r-- | spec/rtems/scheduler/if/map-priority-from-posix.yml | 53 | ||||
-rw-r--r-- | spec/rtems/scheduler/if/map-priority-to-posix.yml | 53 | ||||
-rw-r--r-- | spec/rtems/scheduler/if/remove-processor.yml | 52 |
11 files changed, 543 insertions, 0 deletions
diff --git a/spec/rtems/scheduler/if/add-processor.yml b/spec/rtems/scheduler/if/add-processor.yml new file mode 100644 index 00000000..dab967ce --- /dev/null +++ b/spec/rtems/scheduler/if/add-processor.yml @@ -0,0 +1,52 @@ +SPDX-License-Identifier: CC-BY-SA-4.0 OR BSD-2-Clause +brief: | + Adds the processor to the set of processors owned by the scheduler instance. +copyrights: +- Copyright (C) 2016, 2020 embedded brains GmbH (http://www.embedded-brains.de) +definition: + default: + body: null + params: + - ${../../type/if/id:/name} ${.:/params[0]/name} + - ${/c/if/uint32_t:/name} ${.:/params[1]/name} + return: ${../../status/if/code:/name} + variants: [] +description: null +enabled-by: true +interface-type: function +links: +- role: interface-placement + uid: ../../task/if/header +- role: interface-ingroup + uid: ../../task/if/group +name: rtems_scheduler_add_processor +notes: | + This directive shall be called from task context. It obtains and releases + the objects allocator lock. +params: +- description: is the scheduler instance identifier. + dir: null + name: scheduler_id +- description: is the index of the processor to add. + dir: null + name: cpu_index +return: + return: null + return-values: + - description: | + The requested operation was successful. + value: ${../../status/if/successful:/name} + - description: | + The processor was configured to be used by the application, however, it + was not online. + value: ${../../status/if/incorrect-state:/name} + - description: | + The scheduler instance identifier was invalid. + value: ${../../status/if/invalid-id:/name} + - description: | + The processor was not configured to be used by the application. + value: ${../../status/if/not-configured:/name} + - description: | + The processor was already assigned to a scheduler instance. + value: ${../../status/if/resource-in-use:/name} +type: interface diff --git a/spec/rtems/scheduler/if/get-maximum-priority.yml b/spec/rtems/scheduler/if/get-maximum-priority.yml new file mode 100644 index 00000000..e8c26a62 --- /dev/null +++ b/spec/rtems/scheduler/if/get-maximum-priority.yml @@ -0,0 +1,46 @@ +SPDX-License-Identifier: CC-BY-SA-4.0 OR BSD-2-Clause +brief: | + Gets the maximum task priority of the scheduler instance. +copyrights: +- Copyright (C) 2018, 2020 embedded brains GmbH (http://www.embedded-brains.de) +definition: + default: + body: null + params: + - ${../../type/if/id:/name} ${.:/params[0]/name} + - ${../../task/if/priority:/name} *${.:/params[1]/name} + return: ${../../status/if/code:/name} + variants: [] +description: null +enabled-by: true +interface-type: function +links: +- role: interface-placement + uid: ../../task/if/header +- role: interface-ingroup + uid: ../../task/if/group +name: rtems_scheduler_get_maximum_priority +notes: null +params: +- description: is the scheduler instance identifier. + dir: null + name: scheduler_id +- description: | + is the pointer to a task priority variable. The maximum priority of the + scheduler instance will be stored in this variable, if the operation is + successful. + dir: out + name: priority +return: + return: null + return-values: + - description: | + The requested operation was successful. + value: ${../../status/if/successful:/name} + - description: | + The ${.:/params[1]/name} parameter was ${/c/if/null:/name}. + value: ${../../status/if/invalid-address:/name} + - description: | + The scheduler instance identifier was invalid. + value: ${../../status/if/invalid-id:/name} +type: interface diff --git a/spec/rtems/scheduler/if/get-processor-maximum.yml b/spec/rtems/scheduler/if/get-processor-maximum.yml new file mode 100644 index 00000000..9c5c4f98 --- /dev/null +++ b/spec/rtems/scheduler/if/get-processor-maximum.yml @@ -0,0 +1,33 @@ +SPDX-License-Identifier: CC-BY-SA-4.0 OR BSD-2-Clause +brief: | + Returns the processor maximum supported by the system. +copyrights: +- Copyright (C) 2013, 2020 embedded brains GmbH (http://www.embedded-brains.de) +definition: + default: ${/score/smp/if/get-processor-maximum:/name}() + variants: [] +description: | + In uniprocessor configurations, this macro evaluates to a compile time + constant of one. + + In SMP configurations, this macro returns the minimum of the processors + (physically or virtually) available by the platform and the configured + processor maximum. Not all processors in the range from processor index zero + to the last processor index (which is the processor maximum minus one) may be + configured to be used by a scheduler or may be online (online processors have + a scheduler assigned). +enabled-by: true +interface-type: macro +links: +- role: interface-placement + uid: ../../task/if/header +- role: interface-ingroup + uid: ../../task/if/group +name: rtems_scheduler_get_processor_maximum +notes: null +params: [] +return: + return: | + The processor maximum supported by the system is returned. + return-values: [] +type: interface diff --git a/spec/rtems/scheduler/if/get-processor-set.yml b/spec/rtems/scheduler/if/get-processor-set.yml new file mode 100644 index 00000000..62dbb702 --- /dev/null +++ b/spec/rtems/scheduler/if/get-processor-set.yml @@ -0,0 +1,58 @@ +SPDX-License-Identifier: CC-BY-SA-4.0 OR BSD-2-Clause +brief: | + Gets the set of processors owned by the scheduler instance. +copyrights: +- Copyright (C) 2020 embedded brains GmbH (http://www.embedded-brains.de) +- Copyright (C) 1988, 2017 On-Line Applications Research Corporation (OAR) +definition: + default: + body: null + params: + - ${../../type/if/id:/name} ${.:/params[0]/name} + - ${/c/if/size_t:/name} ${.:/params[1]/name} + - ${/c/if/cpu_set_t:/name} *${.:/params[2]/name} + return: ${../../status/if/code:/name} + variants: [] +description: null +enabled-by: true +interface-type: function +links: +- role: interface-placement + uid: ../../task/if/header +- role: interface-ingroup + uid: ../../task/if/group +name: rtems_scheduler_get_processor_set +notes: null +params: +- description: is the scheduler instance identifier. + dir: null + name: scheduler_id +- description: | + is the size of the referenced processor set variable in bytes. This value + shall be positive. + dir: null + name: cpusetsize +- description: | + is the pointer to a processor set variable. The processor set of the + scheduler instance will be stored in this variable, in case of a successful + operation. A set bit in the processor set means that the corresponding + processor is owned by the scheduler instance, otherwise the bit is cleared. + dir: out + name: cpuset +return: + return: null + return-values: + - description: | + The requested operation was successful. + value: ${../../status/if/successful:/name} + - description: | + The ${.:/params[2]/name} parameter was ${/c/if/null:/name}. + value: ${../../status/if/invalid-address:/name} + - description: | + The scheduler instance identifier was invalid. + value: ${../../status/if/invalid-id:/name} + - description: | + The provided processor set was too small for the set of processors owned + by the scheduler instance. + value: ${../../status/if/invalid-number:/name} +type: interface diff --git a/spec/rtems/scheduler/if/get-processor.yml b/spec/rtems/scheduler/if/get-processor.yml new file mode 100644 index 00000000..8c32712b --- /dev/null +++ b/spec/rtems/scheduler/if/get-processor.yml @@ -0,0 +1,35 @@ +SPDX-License-Identifier: CC-BY-SA-4.0 OR BSD-2-Clause +brief: | + Returns the index of the current processor. +copyrights: +- Copyright (C) 2014, 2020 embedded brains GmbH (http://www.embedded-brains.de) +definition: + default: ${/score/smp/if/get-current-processor:/name}() + variants: [] +description: | + In uniprocessor configurations, this macro evaluates to a compile time + constant of zero. + + In SMP configurations, an architecture-specific method is used to obtain the + index of the current processor in the system. The set of processor indices + is the range of integers starting with zero up to + ${get-processor-maximum:/name} minus one. +enabled-by: true +interface-type: macro +links: +- role: interface-placement + uid: ../../task/if/header +- role: interface-ingroup + uid: ../../task/if/group +name: rtems_scheduler_get_processor +notes: | + Outside of sections with disabled thread dispatching the current processor + index may change after every instruction since the thread may migrate from + one processor to another. Sections with disabled interrupts are sections + with thread dispatching disabled. +params: [] +return: + return: | + The index of the current processor is returned. + return-values: [] +type: interface diff --git a/spec/rtems/scheduler/if/ident-by-processor-set.yml b/spec/rtems/scheduler/if/ident-by-processor-set.yml new file mode 100644 index 00000000..f1c7a3e9 --- /dev/null +++ b/spec/rtems/scheduler/if/ident-by-processor-set.yml @@ -0,0 +1,63 @@ +SPDX-License-Identifier: CC-BY-SA-4.0 OR BSD-2-Clause +brief: | + Identifies a scheduler instance by a processor set. +copyrights: +- Copyright (C) 2017, 2020 embedded brains GmbH (http://www.embedded-brains.de) +definition: + default: + body: null + params: + - ${/c/if/size_t:/name} ${.:/params[0]/name} + - const ${/c/if/cpu_set_t:/name} *${.:/params[1]/name} + - ${../../type/if/id:/name} *${.:/params[2]/name} + return: ${../../status/if/code:/name} + variants: [] +description: | + The scheduler instance is selected according to the highest numbered online + processor in the specified processor set. +enabled-by: true +interface-type: function +links: +- role: interface-placement + uid: ../../task/if/header +- role: interface-ingroup + uid: ../../task/if/group +name: rtems_scheduler_ident_by_processor_set +notes: null +params: +- description: | + is the size of the referenced processor set variable in bytes. This value + shall be positive. + dir: null + name: cpusetsize +- description: | + is the pointer to a processor set variable. The referenced processor set + will be used to identify the scheduler instance. + dir: null + name: cpuset +- description: | + is the pointer to an object identifier variable. The identifier of the + scheduler instance will be stored in this variable, in case of a successful + operation. + dir: out + name: id +return: + return: null + return-values: + - description: | + The requested operation was successful. + value: ${../../status/if/successful:/name} + - description: | + The processor set was valid, however, the highest numbered online + processor in the processor set was not owned by a scheduler instance. + value: ${../../status/if/incorrect-state:/name} + - description: | + The ${.:/params[2]/name} parameter was ${/c/if/null:/name}. + value: ${../../status/if/invalid-address:/name} + - description: | + The processor set contained no online processor. + value: ${../../status/if/invalid-name:/name} + - description: | + The processor set size was invalid. + value: ${../../status/if/invalid-size:/name} +type: interface diff --git a/spec/rtems/scheduler/if/ident-by-processor.yml b/spec/rtems/scheduler/if/ident-by-processor.yml new file mode 100644 index 00000000..4a05cc96 --- /dev/null +++ b/spec/rtems/scheduler/if/ident-by-processor.yml @@ -0,0 +1,51 @@ +SPDX-License-Identifier: CC-BY-SA-4.0 OR BSD-2-Clause +brief: | + Identifies a scheduler instance by a processor index. +copyrights: +- Copyright (C) 2017, 2020 embedded brains GmbH (http://www.embedded-brains.de) +definition: + default: + body: null + params: + - ${/c/if/uint32_t:/name} ${.:/params[0]/name} + - ${../../type/if/id:/name} *${.:/params[1]/name} + return: ${../../status/if/code:/name} + variants: [] +description: null +enabled-by: true +interface-type: function +links: +- role: interface-placement + uid: ../../task/if/header +- role: interface-ingroup + uid: ../../task/if/group +name: rtems_scheduler_ident_by_processor +notes: null +params: +- description: | + is the processor index to identify the scheduler instance. + dir: null + name: cpu_index +- description: | + is the pointer to an object identifier variable. The identifier of the + scheduler instance will be stored in this variable, in case of a successful + operation. + dir: out + name: id +return: + return: null + return-values: + - description: | + The requested operation was successful. + value: ${../../status/if/successful:/name} + - description: | + The processor index was valid, however, the corresponding processor was + not owned by a scheduler instance. + value: ${../../status/if/incorrect-state:/name} + - description: | + The ${.:/params[1]/name} parameter was ${/c/if/null:/name}. + value: ${../../status/if/invalid-address:/name} + - description: | + The processor index was invalid. + value: ${../../status/if/invalid-name:/name} +type: interface diff --git a/spec/rtems/scheduler/if/ident.yml b/spec/rtems/scheduler/if/ident.yml new file mode 100644 index 00000000..3a8a3e9b --- /dev/null +++ b/spec/rtems/scheduler/if/ident.yml @@ -0,0 +1,47 @@ +SPDX-License-Identifier: CC-BY-SA-4.0 OR BSD-2-Clause +brief: | + Identifies a scheduler instance by its name. +copyrights: +- Copyright (C) 2014, 2020 embedded brains GmbH (http://www.embedded-brains.de) +definition: + default: + body: null + params: + - ${../../type/if/name:/name} ${.:/params[0]/name} + - ${../../type/if/id:/name} *${.:/params[1]/name} + return: ${../../status/if/code:/name} + variants: [] +description: null +enabled-by: true +interface-type: function +links: +- role: interface-placement + uid: ../../task/if/header +- role: interface-ingroup + uid: ../../task/if/group +name: rtems_scheduler_ident +notes: | + The scheduler name is determined by the scheduler configuration. +params: +- description: is the scheduler name. + dir: null + name: name +- description: | + is the pointer to an object identifier variable. The identifier of the + scheduler instance will be stored in this variable, in case of a successful + operation. + dir: out + name: id +return: + return: null + return-values: + - description: | + The requested operation was successful. + value: ${../../status/if/successful:/name} + - description: | + The ${.:/params[1]/name} parameter was ${/c/if/null:/name}. + value: ${../../status/if/invalid-address:/name} + - description: | + The scheduler name was invalid. + value: ${../../status/if/invalid-name:/name} +type: interface diff --git a/spec/rtems/scheduler/if/map-priority-from-posix.yml b/spec/rtems/scheduler/if/map-priority-from-posix.yml new file mode 100644 index 00000000..56527ddd --- /dev/null +++ b/spec/rtems/scheduler/if/map-priority-from-posix.yml @@ -0,0 +1,53 @@ +SPDX-License-Identifier: CC-BY-SA-4.0 OR BSD-2-Clause +brief: | + Maps a POSIX thread priority to the corresponding Classic API task priority. +copyrights: +- Copyright (C) 2020 embedded brains GmbH (http://www.embedded-brains.de) +definition: + default: + body: null + params: + - ${../../type/if/id:/name} ${.:/params[0]/name} + - int ${.:/params[1]/name} + - ${../../task/if/priority:/name} *${.:/params[2]/name} + return: ${../../status/if/code:/name} + variants: [] +description: null +enabled-by: true +interface-type: function +links: +- role: interface-placement + uid: ../../task/if/header +- role: interface-ingroup + uid: ../../task/if/group +name: rtems_scheduler_map_priority_from_posix +notes: null +params: +- description: is the scheduler instance identifier. + dir: null + name: scheduler_id +- description: is the POSIX thread priority to map. + dir: null + name: posix_priority +- description: | + is the pointer to a Classic API task priority variable. The Classic API + task priority value corresponding to the specified POSIX thread priority + value will be stored in this variable, in case of a successful operation. + dir: out + name: priority +return: + return: null + return-values: + - description: | + The requested operation was successful. + value: ${../../status/if/successful:/name} + - description: | + The ${.:/params[2]/name} parameter was ${/c/if/null:/name}. + value: ${../../status/if/invalid-address:/name} + - description: | + The scheduler instance identifier was invalid. + value: ${../../status/if/invalid-id:/name} + - description: | + The POSIX thread priority was invalid. + value: ${../../status/if/invalid-priority:/name} +type: interface diff --git a/spec/rtems/scheduler/if/map-priority-to-posix.yml b/spec/rtems/scheduler/if/map-priority-to-posix.yml new file mode 100644 index 00000000..65fe51ea --- /dev/null +++ b/spec/rtems/scheduler/if/map-priority-to-posix.yml @@ -0,0 +1,53 @@ +SPDX-License-Identifier: CC-BY-SA-4.0 OR BSD-2-Clause +brief: | + Maps a Classic API task priority to the corresponding POSIX thread priority. +copyrights: +- Copyright (C) 2020 embedded brains GmbH (http://www.embedded-brains.de) +definition: + default: + body: null + params: + - ${../../type/if/id:/name} ${.:/params[0]/name} + - ${../../task/if/priority:/name} ${.:/params[1]/name} + - int *${.:/params[2]/name} + return: ${../../status/if/code:/name} + variants: [] +description: null +enabled-by: true +interface-type: function +links: +- role: interface-placement + uid: ../../task/if/header +- role: interface-ingroup + uid: ../../task/if/group +name: rtems_scheduler_map_priority_to_posix +notes: null +params: +- description: is the scheduler instance identifier. + dir: null + name: scheduler_id +- description: is the Classic API task priority to map. + dir: null + name: priority +- description: | + is the pointer to a POSIX thread priority variable. The POSIX thread + priority value corresponding to the specified Classic API task priority + value will be stored in this variable, in case of a successful operation. + dir: out + name: posix_priority +return: + return: null + return-values: + - description: | + The requested operation was successful. + value: ${../../status/if/successful:/name} + - description: | + The ${.:/params[2]/name} parameter was ${/c/if/null:/name}. + value: ${../../status/if/invalid-address:/name} + - description: | + The scheduler instance identifier was invalid. + value: ${../../status/if/invalid-id:/name} + - description: | + The Classic API task priority was invalid. + value: ${../../status/if/invalid-priority:/name} +type: interface diff --git a/spec/rtems/scheduler/if/remove-processor.yml b/spec/rtems/scheduler/if/remove-processor.yml new file mode 100644 index 00000000..d1801148 --- /dev/null +++ b/spec/rtems/scheduler/if/remove-processor.yml @@ -0,0 +1,52 @@ +SPDX-License-Identifier: CC-BY-SA-4.0 OR BSD-2-Clause +brief: | + Removes a processor from set of processors owned by the scheduler instance. +copyrights: +- Copyright (C) 2016, 2020 embedded brains GmbH (http://www.embedded-brains.de) +definition: + default: + body: null + params: + - ${../../type/if/id:/name} ${.:/params[0]/name} + - ${/c/if/uint32_t:/name} ${.:/params[1]/name} + return: ${../../status/if/code:/name} + variants: [] +description: null +enabled-by: true +interface-type: function +links: +- role: interface-placement + uid: ../../task/if/header +- role: interface-ingroup + uid: ../../task/if/group +name: rtems_scheduler_remove_processor +notes: | + This directive shall be called from task context. It obtains and releases + the objects allocator lock. Removing a processor from a scheduler instance + is a complex operation that involves all tasks of the system. +params: +- description: is the scheduler instance identifier. + dir: null + name: scheduler_id +- description: is the index of the processor to remove. + dir: null + name: cpu_index +return: + return: null + return-values: + - description: | + The requested operation was successful. + value: ${../../status/if/successful:/name} + - description: | + The scheduler instance identifier was invalid. + value: ${../../status/if/invalid-id:/name} + - description: | + The processor was not owned by the specified scheduler instance. + value: ${../../status/if/invalid-number:/name} + - description: | + The set of processors owned by the specified scheduler instance would + have been empty after the processor removal and there was at least one + non-idle task that used this scheduler instance as its home scheduler + instance. + value: ${../../status/if/resource-in-use:/name} +type: interface |