source: rtems/bsps/shared/dev/cpucounter/cpucounterread.c @ 762fa62

5
Last change on this file since 762fa62 was 7806d9c0, checked in by Sebastian Huber <sebastian.huber@…>, on 04/19/18 at 04:22:32

bsps: Move shared CPU counter support to bsps

This patch is a part of the BSP source reorganization.

Update #3285.

  • Property mode set to 100644
File size: 555 bytes
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#include <rtems/score/cpu.h>
16
17CPU_Counter_ticks _CPU_Counter_read( void )
18{
19  static CPU_Counter_ticks counter;
20
21  CPU_Counter_ticks snapshot;
22
23  snapshot = counter;
24  counter = snapshot + 1;
25
26  return snapshot;
27}
Note: See TracBrowser for help on using the repository browser.