PAPI 7.1.0.0
Loading...
Searching...
No Matches
darwin-common.h File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define min(x, y)
 

Functions

static pid_t mygettid (void)
 
long long _darwin_get_real_cycles (void)
 
long long _darwin_get_virt_usec_times (void)
 
long long _darwin_get_real_usec_gettimeofday (void)
 

Macro Definition Documentation

◆ min

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

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

Function Documentation

◆ _darwin_get_real_cycles()

long long _darwin_get_real_cycles ( void  )

Definition at line 363 of file darwin-common.c.

364{
365 long long retval;
366
367 retval = get_cycles( );
368
369 return retval;
370}
static long long get_cycles(void)
int retval
Definition: zero_fork.c:53
Here is the call graph for this function:

◆ _darwin_get_real_usec_gettimeofday()

long long _darwin_get_real_usec_gettimeofday ( void  )

Definition at line 374 of file darwin-common.c.

375{
376
377 long long retval;
378
379 struct timeval buffer;
380 gettimeofday( &buffer, NULL );
381 retval = ( long long ) buffer.tv_sec * ( long long ) 1000000;
382 retval += ( long long ) ( buffer.tv_usec );
383
384 return retval;
385}
long long int long long
Definition: sde_internal.h:85

◆ _darwin_get_virt_usec_times()

long long _darwin_get_virt_usec_times ( void  )

Definition at line 389 of file darwin-common.c.

390{
391
392 long long retval;
393
394 struct tms buffer;
395
396 times( &buffer );
397
398 SUBDBG( "user %d system %d\n", ( int ) buffer.tms_utime,
399 ( int ) buffer.tms_stime );
400 retval = ( long long ) ( ( buffer.tms_utime + buffer.tms_stime ) *
401 1000000 / sysconf( _SC_CLK_TCK ));
402
403 /* NOT CLOCKS_PER_SEC as in the headers! */
404
405 return retval;
406}
#define SUBDBG(format, args...)
Definition: papi_debug.h:64

◆ mygettid()

static pid_t mygettid ( void  )
inlinestatic

Definition at line 11 of file darwin-common.h.

12{
13 return pthread_self();
14}
Here is the caller graph for this function: