// #define USE_QUEUING_LOCK_FOR_BGET
// #endif
-#ifndef NSEC_PER_SEC
-# define NSEC_PER_SEC 1000000000L
-#endif
-
-#ifndef USEC_PER_SEC
-# define USEC_PER_SEC 1000000L
-#endif
+#define KMP_NSEC_PER_SEC 1000000000L
+#define KMP_USEC_PER_SEC 1000000L
/*!
@ingroup BASIC_TYPES
kmp_uint32 *skip_per_level;
kmp_uint32 my_level;
kmp_int32 parent_tid;
- kmp_uint32 old_tid;
+ kmp_int32 old_tid;
kmp_uint32 depth;
struct kmp_bstate *parent_bar;
kmp_team_t *team;
#if USE_ITT_BUILD
void *itt_sync_obj; /**< ITT object that must be passed to new flag location. */
#endif
- char& byteref(volatile kmp_uint64* loc, size_t offset) { return ((char *)loc)[offset]; }
+ unsigned char& byteref(volatile kmp_uint64* loc, size_t offset) { return ((unsigned char *)loc)[offset]; }
public:
kmp_flag_oncore(volatile kmp_uint64 *p)
: kmp_flag<kmp_uint64>(p, flag_oncore), num_waiting_threads(0), flag_switch(false) {}
interval.tv_nsec = 0;
} else {
interval.tv_sec = 0;
- interval.tv_nsec = (NSEC_PER_SEC / __kmp_monitor_wakeups);
+ interval.tv_nsec = (KMP_NSEC_PER_SEC / __kmp_monitor_wakeups);
}
KA_TRACE( 10, ("__kmp_launch_monitor: #2 monitor\n" ) );
now.tv_sec += interval.tv_sec;
now.tv_nsec += interval.tv_nsec;
- if (now.tv_nsec >= NSEC_PER_SEC) {
+ if (now.tv_nsec >= KMP_NSEC_PER_SEC) {
now.tv_sec += 1;
- now.tv_nsec -= NSEC_PER_SEC;
+ now.tv_nsec -= KMP_NSEC_PER_SEC;
}
status = pthread_mutex_lock( & __kmp_wait_mx.m_mutex );
status = clock_gettime( CLOCK_PROCESS_CPUTIME_ID, &ts );
KMP_CHECK_SYSFAIL_ERRNO( "clock_gettime", status );
- *t = (double) ts.tv_nsec * (1.0 / (double) NSEC_PER_SEC) +
+ *t = (double) ts.tv_nsec * (1.0 / (double) KMP_NSEC_PER_SEC) +
(double) ts.tv_sec;
# else
struct timeval tv;
status = gettimeofday( & tv, NULL );
KMP_CHECK_SYSFAIL_ERRNO( "gettimeofday", status );
- *t = (double) tv.tv_usec * (1.0 / (double) USEC_PER_SEC) +
+ *t = (double) tv.tv_usec * (1.0 / (double) KMP_USEC_PER_SEC) +
(double) tv.tv_sec;
# endif
}
sec += KernelTime.dwLowDateTime;
sec += UserTime.dwLowDateTime;
- cpu_time += (sec * 100.0) / NSEC_PER_SEC;
+ cpu_time += (sec * 100.0) / KMP_NSEC_PER_SEC;
}
return cpu_time;