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 mutex. |
---|
19 | code: | |
---|
20 | ctx->begin = T_tick(); |
---|
21 | ctx->status = rtems_semaphore_release( ctx->mutex_id ); |
---|
22 | description: null |
---|
23 | test-cleanup: null |
---|
24 | test-prepare: null |
---|
25 | test-setup: |
---|
26 | brief: | |
---|
27 | Let one task wait on the mutex. |
---|
28 | code: | |
---|
29 | ObtainMutex( ctx->mutex_id ); |
---|
30 | Send( ctx, EVENT_OBTAIN | EVENT_OBTAIN_END | EVENT_RELEASE ); |
---|
31 | description: null |
---|
32 | test-teardown: |
---|
33 | brief: | |
---|
34 | Set the measured runtime. Discard samples interrupted by a clock tick. |
---|
35 | code: | |
---|
36 | T_quiet_rsc( ctx->status, RTEMS_SUCCESSFUL ); |
---|
37 | |
---|
38 | *delta = ctx->end - ctx->begin; |
---|
39 | |
---|
40 | return tic == toc; |
---|
41 | description: null |
---|
42 | text: | |
---|
43 | Let ``U` and `V`` be two tasks with the same home scheduler. Let :math:`B` |
---|
44 | be a time point measured by ``U`` right before a call to |
---|
45 | ${../if/release:/name} which unblocks task ``V`` which does preempt the |
---|
46 | caller. Let :math:`E` be a time point measured by ``V`` right after the |
---|
47 | first context switch after :math:`B`. |
---|
48 | |
---|
49 | While the execution environment is ${.:/environment}, while the semaphore is |
---|
50 | a priority inheritance mutex, while exactly task ``V`` waits for the mutex, |
---|
51 | while the measurement sample is :math:`E - B`, when exactly |
---|
52 | ${../val/perf:/params/sample-count} samples are collected, the |
---|
53 | ${.:/limit-kind} shall be ${.:/limit-condition}. |
---|
54 | type: requirement |
---|