Date: Sun, 14 May 2006 00:43:47 GMT From: John Birrell <jb@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 97112 for review Message-ID: <200605140043.k4E0hlHW070980@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
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); }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200605140043.k4E0hlHW070980>