PERFORCE change 96147 for review
John Birrell
jb at FreeBSD.org
Wed Apr 26 10:29:47 UTC 2006
http://perforce.freebsd.org/chv.cgi?CH=96147
Change 96147 by jb at jb_freebsd2 on 2006/04/26 10:28:58
Unhack. pthread_cond_reltimedwait_np was easily recoded in the one
place where it was used.
Affected files ...
.. //depot/projects/dtrace/src/contrib/opensolaris/compat/thread.h#4 edit
Differences ...
==== //depot/projects/dtrace/src/contrib/opensolaris/compat/thread.h#4 (text+ko) ====
@@ -54,23 +54,4 @@
#define RW_WRITE_HELD(_a) pthread_rwlock_wrheld_np(_a)
#define RW_LOCK_HELD(x) (RW_READ_HELD(x) || RW_WRITE_HELD(x))
-#define timespecadd(vvp, uvp) \
- do { \
- (vvp)->tv_sec += (uvp)->tv_sec; \
- (vvp)->tv_nsec += (uvp)->tv_nsec; \
- if ((vvp)->tv_nsec >= 1000000000) { \
- (vvp)->tv_sec++; \
- (vvp)->tv_nsec -= 1000000000; \
- } \
- } while (0)
-
-static __inline int pthread_cond_reltimedwait_np(pthread_cond_t *cvp,
- pthread_mutex_t *mp, const struct timespec *reltime)
-{
- struct timespec ts;
- clock_gettime(CLOCK_REALTIME,&ts);
- timespecadd(&ts,reltime);
- return(pthread_cond_timedwait(cvp, mp, &ts));
-}
-
#endif
More information about the p4-projects
mailing list