Date: Tue, 13 Jun 2006 00:50:48 GMT From: John Birrell <jb@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 99100 for review Message-ID: <200606130050.k5D0om5T052777@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=99100 Change 99100 by jb@jb_freebsd2 on 2006/06/13 00:49:56 Don't compile in the functions that reference the non-portable mutex/rwlock held functions. So far I haven't ported any code that requires these. I'll enable them again when I find some. This makes upgrading from FreeBSD-6 easier. Affected files ... .. //depot/projects/dtrace/src/contrib/opensolaris/lib/libdtrace/common/dt_subr.c#8 edit Differences ... ==== //depot/projects/dtrace/src/contrib/opensolaris/lib/libdtrace/common/dt_subr.c#8 (text) ==== @@ -822,41 +822,31 @@ return (popc + dt_popc(bp[maxw] & ((1UL << maxb) - 1))); } +#if defined(sun) struct _rwlock; struct _lwp_mutex; int dt_rw_read_held(pthread_rwlock_t *lock) { -#if defined(sun) extern int _rw_read_held(struct _rwlock *); return (_rw_read_held((struct _rwlock *)lock)); -#else - return (pthread_rwlock_rdheld_np(lock)); -#endif } int dt_rw_write_held(pthread_rwlock_t *lock) { -#if defined(sun) extern int _rw_write_held(struct _rwlock *); return (_rw_write_held((struct _rwlock *)lock)); -#else - return (pthread_rwlock_wrheld_np(lock)); -#endif } int dt_mutex_held(pthread_mutex_t *lock) { -#if defined(sun) extern int _mutex_held(struct _lwp_mutex *); return (_mutex_held((struct _lwp_mutex *)lock)); -#else - return (pthread_mutex_held_np(lock)); +} #endif -} static int dt_string2str(char *s, char *str, int nbytes)
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200606130050.k5D0om5T052777>