Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • kernel/generic/src/adt/cht.c

    rf303afc6 ra35b458  
    296296#include <atomic.h>
    297297#include <synch/rcu.h>
     298
     299#ifdef CONFIG_DEBUG
     300/* Do not enclose in parentheses. */
     301#define DBG(x) x
     302#else
     303#define DBG(x)
     304#endif
    298305
    299306/* Logarithm of the min bucket count. Must be at least 3. 2^6 == 64 buckets. */
     
    17541761        cht_link_t *next = get_next(*psrc_head);
    17551762
    1756 #ifdef CONFIG_DEBUG
    1757         marked_ptr_t ret =
    1758 #endif
    1759             cas_link(pdest_head, &sentinel, N_INVALID, next, N_NORMAL);
     1763        DBG(marked_ptr_t ret = )
     1764                cas_link(pdest_head, &sentinel, N_INVALID, next, N_NORMAL);
    17601765        assert(ret == make_link(&sentinel, N_INVALID) || (N_NORMAL == get_mark(ret)));
    17611766        cas_order_barrier();
    17621767
    1763 #ifdef CONFIG_DEBUG
    1764         ret =
    1765 #endif
    1766             cas_link(psrc_head, next, N_CONST, next, N_INVALID);
     1768        DBG(ret = )
     1769                cas_link(psrc_head, next, N_CONST, next, N_INVALID);
    17671770        assert(ret == make_link(next, N_CONST) || (N_INVALID == get_mark(ret)));
    17681771        cas_order_barrier();
     
    18561859
    18571860        /* Link the dest head to the second part of the split. */
    1858 #ifdef CONFIG_DEBUG
    1859         marked_ptr_t ret =
    1860 #endif
    1861             cas_link(pdest_head, &sentinel, N_INVALID, wnd.cur, N_NORMAL);
     1861        DBG(marked_ptr_t ret = )
     1862                cas_link(pdest_head, &sentinel, N_INVALID, wnd.cur, N_NORMAL);
    18621863        assert(ret == make_link(&sentinel, N_INVALID) || (N_NORMAL == get_mark(ret)));
    18631864        cas_order_barrier();
     
    20392040        }
    20402041
    2041 #ifdef CONFIG_DEBUG
    2042         marked_ptr_t ret =
    2043 #endif
    2044             cas_link(psrc_head, join_node, N_CONST, join_node, N_INVALID);
     2042        DBG(marked_ptr_t ret = )
     2043                cas_link(psrc_head, join_node, N_CONST, join_node, N_INVALID);
    20452044        assert(ret == make_link(join_node, N_CONST) || (N_INVALID == get_mark(ret)));
    20462045        cas_order_barrier();
Note: See TracChangeset for help on using the changeset viewer.