darwin-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 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)

Define Documentation

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

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


Function Documentation

long long _darwin_get_real_cycles ( void   ) 

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

00364 {
00365     long long retval;
00366 
00367     retval = get_cycles(  );
00368 
00369     return retval;
00370 }

long long _darwin_get_real_usec_gettimeofday ( void   ) 

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

00375 {
00376     
00377    long long retval;
00378 
00379    struct timeval buffer;
00380    gettimeofday( &buffer, NULL );
00381    retval = ( long long ) buffer.tv_sec * ( long long ) 1000000;
00382    retval += ( long long ) ( buffer.tv_usec );
00383     
00384    return retval;
00385 }

Here is the call graph for this function:

long long _darwin_get_virt_usec_times ( void   ) 

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

00390 {
00391 
00392    long long retval;
00393 
00394    struct tms buffer;
00395 
00396    times( &buffer );
00397 
00398    SUBDBG( "user %d system %d\n", ( int ) buffer.tms_utime,
00399                 ( int ) buffer.tms_stime );
00400    retval = ( long long ) ( ( buffer.tms_utime + buffer.tms_stime ) * 
00401                 1000000 / sysconf( _SC_CLK_TCK ));
00402 
00403    /* NOT CLOCKS_PER_SEC as in the headers! */
00404     
00405    return retval;
00406 }

static pid_t mygettid ( void   )  [inline, static]

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

00012 {
00013   return pthread_self();
00014 }

Here is the caller graph for this function:


Generated on 8 Sep 2016 for PAPI by  doxygen 1.6.1