PAPI  5.0.1.0
linux-coretemp.h
Go to the documentation of this file.
00001 /****************************/
00002 /* THIS IS OPEN SOURCE CODE */
00003 /****************************/
00004 
00023 #ifndef _PAPI_CORETEMP_H
00024 #define _PAPI_CORETEMP_H
00025 
00026 #include <unistd.h>
00027 #include <dirent.h>
00028 
00029 
00030 
00031 /*************************  DEFINES SECTION  ***********************************
00032  *******************************************************************************/
00033 /* this number assumes that there will never be more events than indicated */
00034 #define CORETEMP_MAX_COUNTERS 512
00035 
00037 typedef struct CORETEMP_register
00038 {
00039     /* This is used by the framework.It likes it to be !=0 to do somehting */
00040     unsigned int selector;
00041     /* These are the only information needed to locate a libsensors event */
00042     int subfeat_nr;
00043 } CORETEMP_register_t;
00044 
00045 /*
00046  * The following structures mimic the ones used by other components. It is more
00047  * convenient to use them like that as programming with PAPI makes specific
00048  * assumptions for them.
00049  */
00050 
00051 
00052 
00054 typedef struct CORETEMP_native_event_entry
00055 {
00056   char name[PAPI_MAX_STR_LEN];
00057   char units[PAPI_MIN_STR_LEN];
00058   char description[PAPI_MAX_STR_LEN];
00059   char path[PATH_MAX];
00060   int stone; /* some counters are set in stone, a max temperature is just that... */
00061   long value;
00062   CORETEMP_register_t resources;
00063 } CORETEMP_native_event_entry_t;
00064 
00065 typedef struct CORETEMP_reg_alloc
00066 {
00067     CORETEMP_register_t ra_bits;
00068 } CORETEMP_reg_alloc_t;
00069 
00070 
00071 typedef struct CORETEMP_control_state
00072 {
00073     long long counts[CORETEMP_MAX_COUNTERS];    // used for caching
00074     long long lastupdate;
00075 } CORETEMP_control_state_t;
00076 
00077 
00078 typedef struct CORETEMP_context
00079 {
00080     CORETEMP_control_state_t state;
00081 } CORETEMP_context_t;
00082 
00083 
00084 
00085 /*************************  GLOBALS SECTION  ***********************************
00086  *******************************************************************************/
00087 
00088 
00089 #endif /* _PAPI_CORETEMP_H */
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Defines