PAPI  5.0.1.0
linux-common.h File Reference
This graph shows which files directly or indirectly include this file:

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 Documentation

#define LINUX_VERSION (   a,
  b,
  c 
)    ( ((a&0xff)<<24) | ((b&0xff)<<16) | ((c&0xff) << 8))

Definition at line 4 of file linux-common.h.

#define min (   x,
  y 
)
Value:
({              \
    typeof(x) _min1 = (x);          \
    typeof(y) _min2 = (y);          \
    (void) (&_min1 == &_min2);      \
    _min1 < _min2 ? _min1 : _min2; })

Definition at line 6 of file linux-common.h.


Function Documentation

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;
}

Here is the caller graph for this function:

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
}
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Defines