Print this page
5045 use atomic_{inc,dec}_* instead of atomic_add_*

@@ -24,12 +24,10 @@
  */
 
 #ifndef _VM_HTABLE_H
 #define _VM_HTABLE_H
 
-#pragma ident   "%Z%%M% %I%     %E% SMI"
-
 #ifdef  __cplusplus
 extern "C" {
 #endif
 
 #if defined(__GNUC__) && defined(_ASM_INLINES) && defined(_KERNEL)

@@ -290,12 +288,12 @@
 /*
  * these are actually inlines for "lock; incw", "lock; decw", etc. instructions.
  */
 #define HTABLE_INC(x)   atomic_inc16((uint16_t *)&x)
 #define HTABLE_DEC(x)   atomic_dec16((uint16_t *)&x)
-#define HTABLE_LOCK_INC(ht)     atomic_add_32(&(ht)->ht_lock_cnt, 1)
-#define HTABLE_LOCK_DEC(ht)     atomic_add_32(&(ht)->ht_lock_cnt, -1)
+#define HTABLE_LOCK_INC(ht)     atomic_inc_32(&(ht)->ht_lock_cnt)
+#define HTABLE_LOCK_DEC(ht)     atomic_dec_32(&(ht)->ht_lock_cnt)
 
 #ifdef __xpv
 extern void xen_flush_va(caddr_t va);
 extern void xen_gflush_va(caddr_t va, cpuset_t);
 extern void xen_flush_tlb(void);