diff options
Diffstat (limited to 'sys/netbt/bluetooth.h')
-rw-r--r-- | sys/netbt/bluetooth.h | 25 |
1 files changed, 22 insertions, 3 deletions
diff --git a/sys/netbt/bluetooth.h b/sys/netbt/bluetooth.h index 5c0752e16ce..027a08fee09 100644 --- a/sys/netbt/bluetooth.h +++ b/sys/netbt/bluetooth.h @@ -1,5 +1,5 @@ -/* $OpenBSD: bluetooth.h,v 1.5 2008/02/24 21:34:48 uwe Exp $ */ -/* $NetBSD: bluetooth.h,v 1.6 2007/09/17 01:23:17 rillig Exp $ */ +/* $OpenBSD: bluetooth.h,v 1.6 2008/11/22 04:42:58 uwe Exp $ */ +/* $NetBSD: bluetooth.h,v 1.8 2008/09/08 23:36:55 gmcgarry Exp $ */ /*- * Copyright (c) 2005 Iain Hibbert. @@ -53,7 +53,7 @@ */ typedef struct { uint8_t b[BLUETOOTH_BDADDR_SIZE]; -} __attribute__ ((packed)) bdaddr_t; +} __packed bdaddr_t; /* * bdaddr utility functions @@ -143,6 +143,25 @@ extern int bluetooth_debug; # define UNKNOWN(x) ((void)0) #endif /* BLUETOOTH_DEBUG */ +extern struct mutex bt_lock; + +/* XXX NetBSD compatibility goo, abused for debugging */ +#ifdef BLUETOOTH_DEBUG +#define mutex_enter(mtx) do { \ + DPRINTFN(1, "mtx_enter(" __STRING(mtx) ") in %d\n", \ + curproc ? curproc->p_pid : 0); \ + mtx_enter((mtx)); \ +} while (/*CONSTCOND*/0) +#define mutex_exit(mtx) do { \ + DPRINTFN(1, "mtx_leave(" __STRING(mtx) ") in %d\n", \ + curproc ? curproc->p_pid : 0); \ + mtx_leave((mtx)); \ +} while (/*CONSTCOND*/0) +#else +#define mutex_enter mtx_enter +#define mutex_exit mtx_leave +#endif + #endif /* _KERNEL */ #endif /* _NETBT_BLUETOOTH_H_ */ |