File: darwin-common.h

package info (click to toggle)
papi 5.7.0+dfsg-2
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, buster, sid
  • size: 9,856 kB
  • sloc: ansic: 93,265; fortran: 3,338; xml: 2,460; makefile: 815; sh: 290
file content (20 lines) | stat: -rw-r--r-- 419 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#ifndef _DARWIN_COMMON_H
#define _DARWIN_COMMON_H

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

static inline pid_t
mygettid( void )
{
  return pthread_self();
}

long long _darwin_get_real_cycles( void );
long long _darwin_get_virt_usec_times( void );
long long _darwin_get_real_usec_gettimeofday( void );

#endif