summaryrefslogtreecommitdiffstats
path: root/sys/netinet/sctp_lock_bsd.h
diff options
context:
space:
mode:
Diffstat (limited to 'sys/netinet/sctp_lock_bsd.h')
-rw-r--r--sys/netinet/sctp_lock_bsd.h19
1 files changed, 8 insertions, 11 deletions
diff --git a/sys/netinet/sctp_lock_bsd.h b/sys/netinet/sctp_lock_bsd.h
index 07d7823..b955647 100644
--- a/sys/netinet/sctp_lock_bsd.h
+++ b/sys/netinet/sctp_lock_bsd.h
@@ -305,7 +305,7 @@ extern int sctp_logoff_stuff;
#define SCTP_DECR_EP_COUNT() \
do { \
- atomic_add_int(&sctppcbinfo.ipi_count_ep,-1); \
+ atomic_subtract_int(&sctppcbinfo.ipi_count_ep, 1); \
} while (0)
#define SCTP_INCR_ASOC_COUNT() \
@@ -315,7 +315,7 @@ extern int sctp_logoff_stuff;
#define SCTP_DECR_ASOC_COUNT() \
do { \
- atomic_add_int(&sctppcbinfo.ipi_count_asoc, -1); \
+ atomic_subtract_int(&sctppcbinfo.ipi_count_asoc, 1); \
} while (0)
#define SCTP_INCR_LADDR_COUNT() \
@@ -325,17 +325,17 @@ extern int sctp_logoff_stuff;
#define SCTP_DECR_LADDR_COUNT() \
do { \
- atomic_add_int(&sctppcbinfo.ipi_count_laddr, -1); \
+ atomic_subtract_int(&sctppcbinfo.ipi_count_laddr, 1); \
} while (0)
#define SCTP_INCR_RADDR_COUNT() \
do { \
- atomic_add_int(&sctppcbinfo.ipi_count_raddr,1); \
+ atomic_add_int(&sctppcbinfo.ipi_count_raddr, 1); \
} while (0)
#define SCTP_DECR_RADDR_COUNT() \
do { \
- atomic_add_int(&sctppcbinfo.ipi_count_raddr,-1); \
+ atomic_subtract_int(&sctppcbinfo.ipi_count_raddr,1); \
} while (0)
#define SCTP_INCR_CHK_COUNT() \
@@ -347,7 +347,7 @@ extern int sctp_logoff_stuff;
do { \
if(sctppcbinfo.ipi_count_chunk == 0) \
panic("chunk count to 0?"); \
- atomic_add_int(&sctppcbinfo.ipi_count_chunk,-1); \
+ atomic_subtract_int(&sctppcbinfo.ipi_count_chunk, 1); \
} while (0)
#define SCTP_INCR_READQ_COUNT() \
@@ -357,7 +357,7 @@ extern int sctp_logoff_stuff;
#define SCTP_DECR_READQ_COUNT() \
do { \
- atomic_add_int(&sctppcbinfo.ipi_count_readq, -1); \
+ atomic_subtract_int(&sctppcbinfo.ipi_count_readq, 1); \
} while (0)
#define SCTP_INCR_STRMOQ_COUNT() \
@@ -367,11 +367,8 @@ extern int sctp_logoff_stuff;
#define SCTP_DECR_STRMOQ_COUNT() \
do { \
- atomic_add_int(&sctppcbinfo.ipi_count_strmoq,-1); \
+ atomic_subtract_int(&sctppcbinfo.ipi_count_strmoq, 1); \
} while (0)
-
-
-
#endif
OpenPOWER on IntegriCloud