From owner-p4-projects@FreeBSD.ORG Fri Apr 14 21:28:30 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 15DE416A408; Fri, 14 Apr 2006 21:28:30 +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 E963E16A405 for ; Fri, 14 Apr 2006 21:28:29 +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 B6DE843D45 for ; Fri, 14 Apr 2006 21:28:29 +0000 (GMT) (envelope-from jb@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id k3ELSTJJ034731 for ; Fri, 14 Apr 2006 21:28:29 GMT (envelope-from jb@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id k3ELSTBG034728 for perforce@freebsd.org; Fri, 14 Apr 2006 21:28:29 GMT (envelope-from jb@freebsd.org) Date: Fri, 14 Apr 2006 21:28:29 GMT Message-Id: <200604142128.k3ELSTBG034728@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 95272 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: Fri, 14 Apr 2006 21:28:30 -0000 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 +#include #include 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