From owner-p4-projects@FreeBSD.ORG Tue Jun 13 00:53:06 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 0680B16A41F; Tue, 13 Jun 2006 00:53:06 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id D59F516A41A for ; Tue, 13 Jun 2006 00:53:05 +0000 (UTC) (envelope-from jb@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id A121443D49 for ; Tue, 13 Jun 2006 00:53:05 +0000 (GMT) (envelope-from jb@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.6/8.13.6) with ESMTP id k5D0omeV052780 for ; Tue, 13 Jun 2006 00:50:48 GMT (envelope-from jb@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.6/8.13.4/Submit) id k5D0om5T052777 for perforce@freebsd.org; Tue, 13 Jun 2006 00:50:48 GMT (envelope-from jb@freebsd.org) Date: Tue, 13 Jun 2006 00:50:48 GMT Message-Id: <200606130050.k5D0om5T052777@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to jb@freebsd.org using -f From: John Birrell To: Perforce Change Reviews Cc: Subject: PERFORCE change 99100 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Jun 2006 00:53:06 -0000 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)