diff options
author | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2021-09-24 09:40:56 +0200 |
---|---|---|
committer | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2021-09-24 13:13:51 +0200 |
commit | c4a9be6b9a6fe693bf7e9f8e9585badf90d8a05c (patch) | |
tree | 9d325a1f14a550b57bd1f884d813bb3d60ec7dbb | |
parent | spec: Test thread queue API change (diff) | |
download | rtems-central-c4a9be6b9a6fe693bf7e9f8e9585badf90d8a05c.tar.bz2 |
spec: Move futex specification
-rw-r--r-- | spec/c/if/group.yml | 2 | ||||
-rw-r--r-- | spec/newlib/if/domain.yml | 13 | ||||
-rw-r--r-- | spec/newlib/if/futex-wait.yml (renamed from spec/score/futex/if/wait.yml) | 2 | ||||
-rw-r--r-- | spec/newlib/if/futex-wake.yml (renamed from spec/score/futex/if/wake.yml) | 2 | ||||
-rw-r--r-- | spec/newlib/if/group.yml | 19 | ||||
-rw-r--r-- | spec/newlib/if/sys-lock.yml (renamed from spec/c/if/sys-lock.yml) | 2 | ||||
-rw-r--r-- | spec/newlib/req/futex-wait.yml (renamed from spec/score/futex/req/wait.yml) | 11 | ||||
-rw-r--r-- | spec/newlib/req/futex-wake.yml (renamed from spec/score/futex/req/wake.yml) | 10 | ||||
-rw-r--r-- | spec/newlib/req/futex.yml | 21 | ||||
-rw-r--r-- | spec/score/futex/if/group.yml | 15 |
10 files changed, 70 insertions, 27 deletions
diff --git a/spec/c/if/group.yml b/spec/c/if/group.yml index 94e5bc39..14dd9fb8 100644 --- a/spec/c/if/group.yml +++ b/spec/c/if/group.yml @@ -1,6 +1,6 @@ SPDX-License-Identifier: CC-BY-SA-4.0 OR BSD-2-Clause brief: | - This group contains ${/glossary/c11:/term} and ${/glossary/posix:/term}. + This group contains ${/glossary/c11:/term} and ${/glossary/posix:/term} interfaces. copyrights: - Copyright (C) 2021 embedded brains GmbH (http://www.embedded-brains.de) diff --git a/spec/newlib/if/domain.yml b/spec/newlib/if/domain.yml new file mode 100644 index 00000000..87d0a06f --- /dev/null +++ b/spec/newlib/if/domain.yml @@ -0,0 +1,13 @@ +SPDX-License-Identifier: CC-BY-SA-4.0 OR BSD-2-Clause +copyrights: +- Copyright (C) 2021 embedded brains GmbH (http://www.embedded-brains.de) +description: | + This interface domain contains interfaces defined by Newlib. +enabled-by: true +index-entries: [] +interface-type: domain +links: +- role: requirement-refinement + uid: /req/domains +name: Newlib +type: interface diff --git a/spec/score/futex/if/wait.yml b/spec/newlib/if/futex-wait.yml index 2f433e37..a7b8ebac 100644 --- a/spec/score/futex/if/wait.yml +++ b/spec/newlib/if/futex-wait.yml @@ -8,7 +8,7 @@ links: - role: interface-ingroup uid: group - role: interface-placement - uid: /c/if/sys-lock + uid: sys-lock name: _Futex_Wait references: [] type: interface diff --git a/spec/score/futex/if/wake.yml b/spec/newlib/if/futex-wake.yml index f6ce9f67..73f65d7a 100644 --- a/spec/score/futex/if/wake.yml +++ b/spec/newlib/if/futex-wake.yml @@ -8,7 +8,7 @@ links: - role: interface-ingroup uid: group - role: interface-placement - uid: /c/if/sys-lock + uid: sys-lock name: _Futex_Wake references: [] type: interface diff --git a/spec/newlib/if/group.yml b/spec/newlib/if/group.yml new file mode 100644 index 00000000..9e47e341 --- /dev/null +++ b/spec/newlib/if/group.yml @@ -0,0 +1,19 @@ +SPDX-License-Identifier: CC-BY-SA-4.0 OR BSD-2-Clause +brief: | + This group contains Newlib interfaces. +copyrights: +- Copyright (C) 2021 embedded brains GmbH (http://www.embedded-brains.de) +description: null +enabled-by: true +identifier: Newlib +index-entries: [] +interface-type: group +links: +- role: requirement-refinement + uid: /req/api +- role: interface-placement + uid: domain +name: Newlib +text: | + The ${/glossary/api:/term} shall provide interfaces defined by Newlib. +type: interface diff --git a/spec/c/if/sys-lock.yml b/spec/newlib/if/sys-lock.yml index 93ccb1b7..ae90377a 100644 --- a/spec/c/if/sys-lock.yml +++ b/spec/newlib/if/sys-lock.yml @@ -1,6 +1,6 @@ SPDX-License-Identifier: CC-BY-SA-4.0 OR BSD-2-Clause brief: | - This header file defines the Newlib-specific interfaces to lock and + This header file defines the Newlib-specific interfaces to locks and other synchronization objects. copyrights: - Copyright (C) 2021 embedded brains GmbH (http://www.embedded-brains.de) diff --git a/spec/score/futex/req/wait.yml b/spec/newlib/req/futex-wait.yml index cd12e1bd..2c11c57d 100644 --- a/spec/score/futex/req/wait.yml +++ b/spec/newlib/req/futex-wait.yml @@ -5,7 +5,9 @@ enabled-by: true functional-type: action links: - role: interface-function - uid: ../if/wait + uid: ../if/futex-wait +- role: requirement-refinement + uid: futex post-conditions: - name: Result states: @@ -13,13 +15,14 @@ post-conditions: test-code: | /* This result is checked by Enqueue() */ text: | - The return status of ${../if/wait:/name} shall be zero. + The return status of ${../if/futex-wait:/name} shall be zero. - name: EAGAIN test-code: | eno = _Futex_Wait( &ctx->futex, &ctx->state, ctx->expected_value ); T_eq_int( eno, EAGAIN ); text: | - The return status of ${../if/wait:/name} shall be ${/c/if/eagain:/name}. + The return status of ${../if/futex-wait:/name} shall be + ${/c/if/eagain:/name}. test-epilogue: null test-prologue: | int eno; @@ -33,7 +36,7 @@ post-conditions: object. - name: 'Yes' test-code: | - ${../../tq/req/enqueue-fifo:/test-run}( &ctx->tq_ctx ); + ${/score/tq/req/enqueue-fifo:/test-run}( &ctx->tq_ctx ); text: | The calling thread shall be enqueued in FIFO order on the thread queue of the futex object. diff --git a/spec/score/futex/req/wake.yml b/spec/newlib/req/futex-wake.yml index c7d42656..fef7a30c 100644 --- a/spec/score/futex/req/wake.yml +++ b/spec/newlib/req/futex-wake.yml @@ -5,9 +5,11 @@ enabled-by: true functional-type: action links: - role: interface-function - uid: ../if/wake + uid: ../if/futex-wake +- role: requirement-refinement + uid: futex - role: validation - uid: ../../tq/req/flush-filter-stop + uid: /score/tq/req/flush-filter-stop post-conditions: - name: Result states: @@ -15,7 +17,7 @@ post-conditions: test-code: | /* This result is checked by Flush() */ text: | - The return status of ${../if/wake:/name} shall be the count of threads + The return status of ${../if/futex-wake:/name} shall be the count of threads extracted from the thread queue of the futex object. test-epilogue: null test-prologue: null @@ -35,7 +37,7 @@ post-conditions: ${/glossary/fifo:/term} order. - name: All test-code: | - ${../../tq/req/flush-fifo:/test-run}( &ctx->tq_ctx ); + ${/score/tq/req/flush-fifo:/test-run}( &ctx->tq_ctx ); text: | All threads shall be extracted from the thread queue of the futex object in ${/glossary/fifo:/term} order. diff --git a/spec/newlib/req/futex.yml b/spec/newlib/req/futex.yml new file mode 100644 index 00000000..a0596ff5 --- /dev/null +++ b/spec/newlib/req/futex.yml @@ -0,0 +1,21 @@ +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 +identifier: RTEMSScoreFutex +links: +- role: interface-ingroup + uid: /score/if/group +non-functional-type: design-group +rationale: | + With the futex support, highly efficient ${/glossary/smp:/term} + synchronization primitives which offer random fairness can be provided by + RTEMS. The futex support is required by the OpenMP implementation from + ${/glossary/gcc:/term}. It is used for barriers which are a core + synchronization primitive of OpenMP. +references: [] +requirement-type: non-functional +text: | + The super core shall have a component containing the futex implementation + those interfaces are defined by Newlib. +type: requirement diff --git a/spec/score/futex/if/group.yml b/spec/score/futex/if/group.yml deleted file mode 100644 index b5037de5..00000000 --- a/spec/score/futex/if/group.yml +++ /dev/null @@ -1,15 +0,0 @@ -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 -identifier: RTEMSScoreFutex -links: -- role: interface-ingroup - uid: ../../if/group -non-functional-type: design-group -rationale: null -references: [] -requirement-type: non-functional -text: | - The super core shall have a component containing the futex implementation. -type: requirement |