|
PAPI
5.0.1.0
|

Go to the source code of this file.
Defines | |
| #define | LINUX_VERSION(a, b, c) ( ((a&0xff)<<24) | ((b&0xff)<<16) | ((c&0xff) << 8)) |
| #define | min(x, y) |
Functions | |
| static pid_t | mygettid (void) |
| int | _linux_detect_nmi_watchdog () |
| #define LINUX_VERSION | ( | a, | |
| b, | |||
| c | |||
| ) | ( ((a&0xff)<<24) | ((b&0xff)<<16) | ((c&0xff) << 8)) |
Definition at line 4 of file linux-common.h.
| int _linux_detect_nmi_watchdog | ( | ) |
Definition at line 583 of file linux-common.c.
{
int watchdog_detected=0,watchdog_value=0;
FILE *fff;
fff=fopen("/proc/sys/kernel/nmi_watchdog","r");
if (fff!=NULL) {
if (fscanf(fff,"%d",&watchdog_value)==1) {
if (watchdog_value>0) watchdog_detected=1;
}
fclose(fff);
}
return watchdog_detected;
}

| static pid_t mygettid | ( | void | ) | [inline, static] |
Definition at line 13 of file linux-common.h.
{
#ifdef SYS_gettid
return syscall( SYS_gettid );
#elif defined(__NR_gettid)
return syscall( __NR_gettid );
#else
#error "cannot find gettid"
#endif
}