From owner-p4-projects@FreeBSD.ORG Sun May 14 00:43:53 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 08D3416A411; Sun, 14 May 2006 00:43:53 +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 C067B16A40A for ; Sun, 14 May 2006 00:43:52 +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 6F47543D45 for ; Sun, 14 May 2006 00:43:52 +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 k4E0hlPt070983 for ; Sun, 14 May 2006 00:43:47 GMT (envelope-from jb@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.6/8.13.4/Submit) id k4E0hlHW070980 for perforce@freebsd.org; Sun, 14 May 2006 00:43:47 GMT (envelope-from jb@freebsd.org) Date: Sun, 14 May 2006 00:43:47 GMT Message-Id: <200605140043.k4E0hlHW070980@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 97112 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: Sun, 14 May 2006 00:43:53 -0000 http://perforce.freebsd.org/chv.cgi?CH=97112 Change 97112 by jb@jb_freebsd2 on 2006/05/14 00:43:24 Use weak symbols for the added functions. Affected files ... .. //depot/projects/dtrace/src/lib/libpthread/thread/thr_mutex.c#4 edit .. //depot/projects/dtrace/src/lib/libpthread/thread/thr_rwlock.c#3 edit Differences ... ==== //depot/projects/dtrace/src/lib/libpthread/thread/thr_mutex.c#4 (text+ko) ==== @@ -107,6 +107,8 @@ LT10_COMPAT_DEFAULT(pthread_mutex_destroy); LT10_COMPAT_PRIVATE(_pthread_mutex_unlock); LT10_COMPAT_DEFAULT(pthread_mutex_unlock); +LT10_COMPAT_PRIVATE(_pthread_mutex_held_np); +LT10_COMPAT_DEFAULT(pthread_mutex_held_np); /* Single underscore versions provided for libc internal usage: */ __weak_reference(__pthread_mutex_init, pthread_mutex_init); @@ -117,6 +119,7 @@ /* No difference between libc and application usage of these: */ __weak_reference(_pthread_mutex_destroy, pthread_mutex_destroy); __weak_reference(_pthread_mutex_unlock, pthread_mutex_unlock); +__weak_reference(_pthread_mutex_held_np, pthread_mutex_held_np); @@ -1583,7 +1586,7 @@ } int -pthread_mutex_held_np(pthread_mutex_t *m) +_pthread_mutex_held_np(pthread_mutex_t *m) { return((*m)->m_owner == _get_curthread()); } ==== //depot/projects/dtrace/src/lib/libpthread/thread/thr_rwlock.c#3 (text+ko) ==== @@ -56,6 +56,10 @@ LT10_COMPAT_DEFAULT(pthread_rwlock_wrlock); LT10_COMPAT_PRIVATE(_pthread_rwlock_timedwrlock); LT10_COMPAT_DEFAULT(pthread_rwlock_timedwrlock); +LT10_COMPAT_PRIVATE(_pthread_rwlock_rdheld_np); +LT10_COMPAT_DEFAULT(pthread_rwlock_rdheld_np); +LT10_COMPAT_PRIVATE(_pthread_rwlock_wrheld_np); +LT10_COMPAT_DEFAULT(pthread_rwlock_wrheld_np); __weak_reference(_pthread_rwlock_destroy, pthread_rwlock_destroy); __weak_reference(_pthread_rwlock_init, pthread_rwlock_init); @@ -66,6 +70,8 @@ __weak_reference(_pthread_rwlock_unlock, pthread_rwlock_unlock); __weak_reference(_pthread_rwlock_wrlock, pthread_rwlock_wrlock); __weak_reference(_pthread_rwlock_timedwrlock, pthread_rwlock_timedwrlock); +__weak_reference(_pthread_rwlock_rdheld_np, pthread_rwlock_rdheld_np); +__weak_reference(_pthread_rwlock_wrheld_np, pthread_rwlock_wrheld_np); /* * Prototypes @@ -438,13 +444,13 @@ } int -pthread_rwlock_rdheld_np(pthread_rwlock_t *rwlock) +_pthread_rwlock_rdheld_np(pthread_rwlock_t *rwlock) { return((*rwlock)->state > 0); } int -pthread_rwlock_wrheld_np(pthread_rwlock_t *rwlock) +_pthread_rwlock_wrheld_np(pthread_rwlock_t *rwlock) { return((*rwlock)->state < 0); }