linux-common.h File Reference

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  f_owner_ex

Defines

#define LINUX_VERSION(a, b, c)   ( ((a&0xff)<<24) | ((b&0xff)<<16) | ((c&0xff) << 8))
#define min(x, y)
#define F_SETOWN_EX   15
#define F_GETOWN_EX   16
#define F_OWNER_TID   0
#define F_OWNER_PID   1
#define F_OWNER_PGRP   2
#define _papi_getcpu()   0

Functions

static pid_t mygettid (void)
int _linux_detect_nmi_watchdog ()

Define Documentation

 
#define _papi_getcpu (  )     0

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

#define F_GETOWN_EX   16

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

#define F_OWNER_PGRP   2

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

#define F_OWNER_PID   1

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

#define F_OWNER_TID   0

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

#define F_SETOWN_EX   15

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

#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

int _linux_detect_nmi_watchdog (  ) 

Definition at line 738 of file linux-common.c.

00738                                  {
00739 
00740   int watchdog_detected=0,watchdog_value=0;
00741   FILE *fff;
00742 
00743   fff=fopen("/proc/sys/kernel/nmi_watchdog","r");
00744   if (fff!=NULL) {
00745      if (fscanf(fff,"%d",&watchdog_value)==1) {
00746         if (watchdog_value>0) watchdog_detected=1;
00747      }
00748      fclose(fff);
00749   }
00750 
00751   return watchdog_detected;
00752 }

Here is the caller graph for this function:

static pid_t mygettid ( void   )  [inline, static]

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

00014 {
00015 #ifdef SYS_gettid
00016     return syscall( SYS_gettid );
00017 #elif defined(__NR_gettid)
00018     return syscall( __NR_gettid );
00019 #else
00020 #error "cannot find gettid"
00021 #endif
00022 }


Generated on 8 Sep 2016 for PAPI by  doxygen 1.6.1