Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 26 Jan 2008 22:31:38 GMT
From:      John Birrell <jb@FreeBSD.org>
To:        Perforce Change Reviews <perforce@freebsd.org>
Subject:   PERFORCE change 134157 for review
Message-ID:  <200801262231.m0QMVca4069817@repoman.freebsd.org>

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

Change 134157 by jb@jb_freebsd1 on 2008/01/26 22:30:47

	Use FreeBSD mutexes rather than the compatiblized ones.

Affected files ...

.. //depot/projects/dtrace/src/sys/contrib/opensolaris/uts/common/sys/fasttrap_impl.h#2 edit

Differences ...

==== //depot/projects/dtrace/src/sys/contrib/opensolaris/uts/common/sys/fasttrap_impl.h#2 (text) ====

@@ -74,7 +74,11 @@
 	pid_t ftpc_pid;				/* process ID for this proc */
 	uint64_t ftpc_acount;			/* count of active providers */
 	uint64_t ftpc_rcount;			/* provider reference count */
+#if defined(sun)
 	kmutex_t ftpc_mtx;			/* proc lock */
+#else
+	struct mtx ftpc_mtx;			/* proc lock */
+#endif
 	struct fasttrap_proc *ftpc_next;	/* next proc in hash chain */
 } fasttrap_proc_t;
 
@@ -84,8 +88,13 @@
 	dtrace_provider_id_t ftp_provid;	/* DTrace provider handle */
 	uint_t ftp_marked;			/* mark for possible removal */
 	uint_t ftp_retired;			/* mark when retired */
+#if defined(sun)
 	kmutex_t ftp_mtx;			/* provider lock */
 	kmutex_t ftp_cmtx;			/* lock on creating probes */
+#else
+	struct mtx ftp_mtx;			/* provider lock */
+	struct mtx ftp_cmtx;			/* lock on creating probes */
+#endif
 	uint64_t ftp_rcount;			/* enabled probes ref count */
 	uint64_t ftp_ccount;			/* consumers creating probes */
 	uint64_t ftp_mcount;			/* meta provider count */
@@ -139,10 +148,14 @@
 };
 
 typedef struct fasttrap_bucket {
+#if defined(sun)
 	kmutex_t ftb_mtx;			/* bucket lock */
+#else
+	struct mtx ftb_mtx;			/* bucket lock */
+#endif
 	void *ftb_data;				/* data payload */
 
-	uint8_t ftb_pad[64 - sizeof (kmutex_t) - sizeof (void *)];
+	uint8_t ftb_pad[64 - sizeof (struct mtx) - sizeof (void *)];
 } fasttrap_bucket_t;
 
 typedef struct fasttrap_hash {



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