summaryrefslogtreecommitdiffstats
path: root/spec/rtems/barrier/val/perf.yml
blob: a4266868f3d48890fa1e66f62d25b66bd014f133 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
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
links:
- role: validation
  uid: ../req/perf-runtime
params:
  sample-count: 100
test-brief: |
  This test case provides a context to run ${../if/group:/name} performance
  tests.
test-cleanup: null
test-context:
- brief: |
    This member provides a barrier identifier.
  description: null
  member: |
    rtems_id barrier_id
- brief: |
    This member provides a worker identifier.
  description: null
  member: |
    rtems_id worker_id
- brief: |
    This member provides a status code.
  description: null
  member: |
    rtems_status_code status
test-context-support: null
test-description: null
test-includes:
- rtems.h
test-local-includes:
- tx-support.h
test-prepare: null
test-setup: null
test-stop: null
test-support: |
  typedef ${.:/test-context-type} Context;

  static void BarrierWaitWorker( rtems_task_argument arg )
  {
    Context *ctx;

    ctx = (Context *) arg;

    while ( true ) {
      rtems_status_code sc;

      sc = rtems_barrier_wait( ctx->barrier_id, RTEMS_NO_TIMEOUT );
      ctx->end = T_tick();
      T_quiet_rsc_success( sc );
    }
  }
test-target: testsuites/validation/tc-barrier-performance.c
test-teardown: null
type: runtime-measurement-test