Ignore:
File:
1 edited

Legend:

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

    ra35b458 rf303afc6  
    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
    305298
    306299/* Logarithm of the min bucket count. Must be at least 3. 2^6 == 64 buckets. */
     
    17611754        cht_link_t *next = get_next(*psrc_head);
    17621755
    1763         DBG(marked_ptr_t ret = )
    1764                 cas_link(pdest_head, &sentinel, N_INVALID, next, N_NORMAL);
     1756#ifdef CONFIG_DEBUG
     1757        marked_ptr_t ret =
     1758#endif
     1759            cas_link(pdest_head, &sentinel, N_INVALID, next, N_NORMAL);
    17651760        assert(ret == make_link(&sentinel, N_INVALID) || (N_NORMAL == get_mark(ret)));
    17661761        cas_order_barrier();
    17671762
    1768         DBG(ret = )
    1769                 cas_link(psrc_head, next, N_CONST, next, N_INVALID);
     1763#ifdef CONFIG_DEBUG
     1764        ret =
     1765#endif
     1766            cas_link(psrc_head, next, N_CONST, next, N_INVALID);
    17701767        assert(ret == make_link(next, N_CONST) || (N_INVALID == get_mark(ret)));
    17711768        cas_order_barrier();
     
    18591856
    18601857        /* Link the dest head to the second part of the split. */
    1861         DBG(marked_ptr_t ret = )
    1862                 cas_link(pdest_head, &sentinel, N_INVALID, wnd.cur, N_NORMAL);
     1858#ifdef CONFIG_DEBUG
     1859        marked_ptr_t ret =
     1860#endif
     1861            cas_link(pdest_head, &sentinel, N_INVALID, wnd.cur, N_NORMAL);
    18631862        assert(ret == make_link(&sentinel, N_INVALID) || (N_NORMAL == get_mark(ret)));
    18641863        cas_order_barrier();
     
    20402039        }
    20412040
    2042         DBG(marked_ptr_t ret = )
    2043                 cas_link(psrc_head, join_node, N_CONST, join_node, N_INVALID);
     2041#ifdef CONFIG_DEBUG
     2042        marked_ptr_t ret =
     2043#endif
     2044            cas_link(psrc_head, join_node, N_CONST, join_node, N_INVALID);
    20442045        assert(ret == make_link(join_node, N_CONST) || (N_INVALID == get_mark(ret)));
    20452046        cas_order_barrier();
Note: See TracChangeset for help on using the changeset viewer.