Mercurial > illumos > illumos-gate
changeset 12856:ba7e21257652
6968754 Missing braces in macro VHCI_DECR_PATH_CMDCOUNT
author | Milos Muzik <Milos.Muzik@Sun.COM> |
---|---|
date | Wed, 14 Jul 2010 15:00:45 +0200 |
parents | 77e45a7491be |
children | 028e6037e8be |
files | usr/src/uts/common/sys/scsi/adapters/scsi_vhci.h |
diffstat | 1 files changed, 12 insertions(+), 8 deletions(-) [+] |
line wrap: on
line diff
--- a/usr/src/uts/common/sys/scsi/adapters/scsi_vhci.h Fri Jul 16 08:39:50 2010 -0600 +++ b/usr/src/uts/common/sys/scsi/adapters/scsi_vhci.h Wed Jul 14 15:00:45 2010 +0200 @@ -111,15 +111,19 @@ #define VHCIPKT2HBAPKT(pkt) (pkt->pkt_hba_pkt) #define VHCIPKT2TGTPKT(pkt) (pkt->pkt_tgt_pkt) -#define VHCI_DECR_PATH_CMDCOUNT(svp) mutex_enter(&(svp)->svp_mutex); \ - (svp)->svp_cmds--; \ - if ((svp)->svp_cmds == 0) \ - cv_broadcast(&(svp)->svp_cv); \ - mutex_exit(&(svp)->svp_mutex); +#define VHCI_DECR_PATH_CMDCOUNT(svp) { \ + mutex_enter(&(svp)->svp_mutex); \ + (svp)->svp_cmds--; \ + if ((svp)->svp_cmds == 0) \ + cv_broadcast(&(svp)->svp_cv); \ + mutex_exit(&(svp)->svp_mutex); \ +} -#define VHCI_INCR_PATH_CMDCOUNT(svp) mutex_enter(&(svp)->svp_mutex); \ - (svp)->svp_cmds++; \ - mutex_exit(&(svp)->svp_mutex); +#define VHCI_INCR_PATH_CMDCOUNT(svp) { \ + mutex_enter(&(svp)->svp_mutex); \ + (svp)->svp_cmds++; \ + mutex_exit(&(svp)->svp_mutex); \ +} /* * When a LUN is HELD it results in new IOs being returned to the target