source: rtems/cpukit/score/src/profilingsmplock.c @ 469dc47

5
Last change on this file since 469dc47 was d811dac, checked in by Sebastian Huber <sebastian.huber@…>, on 06/25/15 at 09:24:44

score: Hide SMP lock profiling impl if disabled

The problem is that empty structures have a different size in C and C++.

  • Property mode set to 100644
File size: 1.0 KB
Line 
1/*
2 * Copyright (c) 2014 embedded brains GmbH.  All rights reserved.
3 *
4 *  embedded brains GmbH
5 *  Dornierstr. 4
6 *  82178 Puchheim
7 *  Germany
8 *  <rtems@embedded-brains.de>
9 *
10 * The license and distribution terms for this file may be
11 * found in the file LICENSE in this distribution or at
12 * http://www.rtems.org/license/LICENSE.
13 */
14
15#ifdef HAVE_CONFIG_H
16  #include "config.h"
17#endif
18
19#include <rtems/score/smplock.h>
20
21#if defined( RTEMS_PROFILING )
22SMP_lock_Stats_control _SMP_lock_Stats_control = {
23  .Lock = {
24    .Ticket_lock = {
25      .next_ticket = ATOMIC_INITIALIZER_UINT( 0U ),
26      .now_serving = ATOMIC_INITIALIZER_UINT( 0U )
27    },
28    .Stats = {
29      .Node = CHAIN_NODE_INITIALIZER_ONE_NODE_CHAIN(
30        &_SMP_lock_Stats_control.Stats_chain
31      ),
32      .name = "SMP Lock Stats"
33    }
34  },
35  .Stats_chain = CHAIN_INITIALIZER_ONE_NODE(
36    &_SMP_lock_Stats_control.Lock.Stats.Node
37  ),
38  .Iterator_chain = CHAIN_INITIALIZER_EMPTY(
39    _SMP_lock_Stats_control.Iterator_chain
40  )
41};
42#endif /* defined( RTEMS_PROFILING ) */
Note: See TracBrowser for help on using the repository browser.