Date: Wed, 26 Apr 2006 10:29:39 GMT From: John Birrell <jb@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 96147 for review Message-ID: <200604261029.k3QATdP5059961@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=96147 Change 96147 by jb@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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200604261029.k3QATdP5059961>