21#include <boost/date_time.hpp>
34#if !defined(HAVE_PTHREAD_YIELD_ONE_ARG) && !defined(HAVE_PTHREAD_YIELD_ZERO_ARG)
36#define pthread_yield() sched_yield()
45#define set_timespec(ABSTIME,SEC) \
49 (ABSTIME).tv_sec=tv.tv_sec+(time_t) (SEC);\
50 (ABSTIME).tv_nsec=tv.tv_usec*1000;\
53#ifndef set_timespec_nsec
54#define set_timespec_nsec(ABSTIME,NSEC) \
56 boost::posix_time::ptime mytime(boost::posix_time::microsec_clock::local_time());\
57 boost::posix_time::ptime epoch(boost::gregorian::date(1970,1,1));\
58 uint64_t t_mark= (mytime-epoch).total_microseconds();\
59 uint64_t now= t_mark + (NSEC/100); \
60 (ABSTIME).tv_sec= (time_t) (now / 10000000UL); \
61 (ABSTIME).tv_nsec= (long) (now % 10000000UL * 100 + ((NSEC) % 100)); \
66#define safe_mutex_assert_owner(mp)
67#define safe_mutex_assert_not_owner(mp)
72#ifdef THREAD_ADAPTIVE_MUTEX_INITIALIZER_NP
73extern pthread_mutexattr_t my_fast_mutexattr;
74#define MY_MUTEX_INIT_FAST &my_fast_mutexattr
76#define MY_MUTEX_INIT_FAST NULL
TODO: Rename this file - func.h is stupid.
Visibility Control Macros.