OpenMPI  0.1.1
timer_altix.h
1 /*
2  * Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana
3  * University Research and Technology
4  * Corporation. All rights reserved.
5  * Copyright (c) 2004-2005 The University of Tennessee and The University
6  * of Tennessee Research Foundation. All rights
7  * reserved.
8  * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
9  * University of Stuttgart. All rights reserved.
10  * Copyright (c) 2004-2005 The Regents of the University of California.
11  * All rights reserved.
12  * $COPYRIGHT$
13  *
14  * Additional copyrights may follow
15  *
16  * $HEADER$
17  */
18 
19 #ifndef OPAL_MCA_TIMER_ALTIX_TIMER_ALTIX_H
20 #define OPAL_MCA_TIMER_ALTIX_TIMER_ALTIX_H
21 
22 #include <opal/sys/timer.h>
23 
24 extern opal_timer_t opal_timer_altix_freq;
25 extern opal_timer_t opal_timer_altix_usec_conv;
26 extern volatile unsigned long *opal_timer_altix_mmdev_timer_addr;
27 
28 static inline opal_timer_t
29 opal_timer_base_get_cycles(void)
30 {
31  return (*opal_timer_altix_mmdev_timer_addr);
32 }
33 
34 
35 static inline opal_timer_t
36 opal_timer_base_get_usec(void)
37 {
38  return opal_timer_base_get_cycles() / opal_timer_altix_usec_conv;
39 }
40 
41 
42 static inline opal_timer_t
43 opal_timer_base_get_freq(void)
44 {
45  return opal_timer_altix_freq;
46 }
47 
48 
49 #define OPAL_TIMER_CYCLE_NATIVE 1
50 #define OPAL_TIMER_CYCLE_SUPPORTED 1
51 #define OPAL_TIMER_USEC_NATIVE 0
52 #define OPAL_TIMER_USEC_SUPPORTED 1
53 
54 #endif
Cycle counter reading instructions.