1 | SPDX-License-Identifier: CC-BY-SA-4.0 OR BSD-2-Clause |
---|
2 | copyrights: |
---|
3 | - Copyright (C) 2021 embedded brains GmbH (http://www.embedded-brains.de) |
---|
4 | enabled-by: true |
---|
5 | limits: {} |
---|
6 | links: |
---|
7 | - role: requirement-refinement |
---|
8 | uid: perf-runtime |
---|
9 | - role: runtime-measurement-request |
---|
10 | uid: ../val/perf |
---|
11 | non-functional-type: performance-runtime |
---|
12 | params: {} |
---|
13 | rationale: null |
---|
14 | references: [] |
---|
15 | requirement-type: non-functional |
---|
16 | test-body: |
---|
17 | brief: | |
---|
18 | Release the barrier. |
---|
19 | code: | |
---|
20 | uint32_t count; |
---|
21 | |
---|
22 | ctx->status = rtems_barrier_release( ctx->barrier_id, &count ); |
---|
23 | description: null |
---|
24 | test-cleanup: |
---|
25 | brief: | |
---|
26 | Delete the barrier and the worker. |
---|
27 | code: | |
---|
28 | rtems_status_code sc; |
---|
29 | |
---|
30 | DeleteTask( ctx->worker_id ); |
---|
31 | |
---|
32 | sc = rtems_barrier_delete( ctx->barrier_id ); |
---|
33 | T_rsc_success( sc ); |
---|
34 | |
---|
35 | RestoreRunnerPriority(); |
---|
36 | description: null |
---|
37 | test-prepare: |
---|
38 | brief: | |
---|
39 | Create a manual release barrier. Create and start a worker task. |
---|
40 | code: | |
---|
41 | rtems_status_code sc; |
---|
42 | |
---|
43 | sc = rtems_barrier_create( |
---|
44 | OBJECT_NAME, |
---|
45 | RTEMS_BARRIER_MANUAL_RELEASE, |
---|
46 | 0, |
---|
47 | &ctx->barrier_id |
---|
48 | ); |
---|
49 | T_rsc_success( sc ); |
---|
50 | |
---|
51 | SetSelfPriority( PRIO_NORMAL ); |
---|
52 | ctx->worker_id = CreateTask( "WORK", PRIO_HIGH ); |
---|
53 | StartTask( ctx->worker_id, BarrierWaitWorker, ctx ); |
---|
54 | description: null |
---|
55 | test-setup: null |
---|
56 | test-teardown: |
---|
57 | brief: | |
---|
58 | Set the measured runtime. Discard samples interrupted by a clock tick. |
---|
59 | code: | |
---|
60 | T_quiet_rsc_success( ctx->status ); |
---|
61 | |
---|
62 | *delta = ctx->end - ctx->begin; |
---|
63 | |
---|
64 | return tic == toc; |
---|
65 | description: null |
---|
66 | text: | |
---|
67 | Let ``U` and `V`` be two tasks with the same home scheduler. Let :math:`B` |
---|
68 | be a time point measured by ``U`` right before a call to |
---|
69 | ${../if/release:/name} which preempts the caller. Let :math:`E` be a time |
---|
70 | point measured by ``V`` right after a call to ${../if/wait:/name} returns |
---|
71 | successfully due to the ${../if/release:/name} call associated with |
---|
72 | :math:`B`. While the execution environment is ${.:/environment}, while the |
---|
73 | barrier is a manual release barrier, while the measurement sample is :math:`E |
---|
74 | - B`, when exactly ${../val/perf:/params/sample-count} samples are collected, |
---|
75 | the ${.:/limit-kind} shall be ${.:/limit-condition}. |
---|
76 | type: requirement |
---|