5
Last change
on this file since 5c6edee was
655ce0fb,
checked in by Sebastian Huber <sebastian.huber@…>, on 06/22/16 at 11:45:02
|
sparc: Optimize CPU counter support
|
-
Property mode set to
100644
|
File size:
972 bytes
|
Line | |
---|
1 | /* |
---|
2 | * Copyright (c) 2014, 2016 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 | #if HAVE_CONFIG_H |
---|
16 | #include "config.h" |
---|
17 | #endif |
---|
18 | |
---|
19 | #include <rtems/score/sparcimpl.h> |
---|
20 | #include <rtems/config.h> |
---|
21 | |
---|
22 | CPU_Counter_ticks _SPARC_Counter_difference_normal( |
---|
23 | CPU_Counter_ticks second, |
---|
24 | CPU_Counter_ticks first |
---|
25 | ) |
---|
26 | { |
---|
27 | return second - first; |
---|
28 | } |
---|
29 | |
---|
30 | CPU_Counter_ticks _SPARC_Counter_difference_clock_period( |
---|
31 | CPU_Counter_ticks second, |
---|
32 | CPU_Counter_ticks first |
---|
33 | ) |
---|
34 | { |
---|
35 | CPU_Counter_ticks period; |
---|
36 | |
---|
37 | period = rtems_configuration_get_microseconds_per_tick(); |
---|
38 | |
---|
39 | return ( first + period - second ) % period; |
---|
40 | } |
---|
41 | |
---|
42 | CPU_Counter_ticks _SPARC_Counter_difference_one( |
---|
43 | CPU_Counter_ticks second, |
---|
44 | CPU_Counter_ticks first |
---|
45 | ) |
---|
46 | { |
---|
47 | return 1; |
---|
48 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.