PAPI  5.3.0.0
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
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
 

Macros

#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
 

Functions

static pid_t mygettid (void)
 
int _linux_detect_nmi_watchdog ()
 

Macro Definition Documentation

#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; })
long long y
Definition: iozone.c:1335
int x
Definition: fileop.c:78

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

Function Documentation

int _linux_detect_nmi_watchdog ( )

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

584  {
585 
586  int watchdog_detected=0,watchdog_value=0;
587  FILE *fff;
588 
589  fff=fopen("/proc/sys/kernel/nmi_watchdog","r");
590  if (fff!=NULL) {
591  if (fscanf(fff,"%d",&watchdog_value)==1) {
592  if (watchdog_value>0) watchdog_detected=1;
593  }
594  fclose(fff);
595  }
596 
597  return watchdog_detected;
598 }
fclose(thread_wqfd)
FILE * fff[MAX_EVENTS]

Here is the call graph for this function:

Here is the caller graph for this function:

static pid_t mygettid ( void  )
inlinestatic

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

14 {
15 #ifdef SYS_gettid
16  return syscall( SYS_gettid );
17 #elif defined(__NR_gettid)
18  return syscall( __NR_gettid );
19 #else
20 #error "cannot find gettid"
21 #endif
22 }