PERFORCE change 99100 for review
John Birrell
jb at FreeBSD.org
Tue Jun 13 00:53:06 UTC 2006
http://perforce.freebsd.org/chv.cgi?CH=99100
Change 99100 by jb at 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)
More information about the p4-projects
mailing list