Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 14 Apr 2006 21:28:29 GMT
From:      John Birrell <jb@FreeBSD.org>
To:        Perforce Change Reviews <perforce@freebsd.org>
Subject:   PERFORCE change 95272 for review
Message-ID:  <200604142128.k3ELSTBG034728@repoman.freebsd.org>

next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=95272

Change 95272 by jb@jb_freebsd2 on 2006/04/14 21:28:11

	Add some more compatibility cruft.

Affected files ...

.. //depot/projects/dtrace/src/contrib/opensolaris/compat/thread.h#2 edit

Differences ...

==== //depot/projects/dtrace/src/contrib/opensolaris/compat/thread.h#2 (text+ko) ====

@@ -30,6 +30,7 @@
 #define _OPENSOLARIS_COMPAT_THREAD_H_
 
 #include <pthread.h>
+#include <pthread_np.h>
 #include <opensolaris/compat/sys/synch.h>
 
 typedef int	thread_key_t;
@@ -37,4 +38,20 @@
 typedef struct	pthread_mutex	*mutex_t;
 typedef struct	pthread_rwlock	*rwlock_t;
 
+#define	mutex_lock		pthread_mutex_lock
+#define	mutex_unlock		pthread_mutex_unlock
+#define	mutex_init(_a,_b,_c)	pthread_mutex_init(_a,_c)
+#define	rwlock_init(_a,_b,_c)	pthread_rwlock_init(_a,_c)
+#define	rw_rdlock		pthread_rwlock_rdlock
+#define	rw_wrlock		pthread_rwlock_wrlock
+#define	rw_unlock		pthread_rwlock_unlock
+#define	thr_keycreate		pthread_key_create
+#define	thr_setspecific		pthread_setspecific
+#define	thr_main		pthread_main_np
+#define _mutex_held(_a)		pthread_mutex_held_np(_a)
+#define MUTEX_HELD(_a)		pthread_mutex_held_np(_a)
+#define RW_READ_HELD(_a)	pthread_rwlock_rdheld_np(_a)
+#define RW_WRITE_HELD(_a)	pthread_rwlock_wrheld_np(_a)
+#define	RW_LOCK_HELD(x)		(RW_READ_HELD(x) || RW_WRITE_HELD(x))
+
 #endif



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200604142128.k3ELSTBG034728>