Changeset bf2042f9 in mainline


Ignore:
Timestamp:
2018-03-27T06:48:39Z (7 years ago)
Author:
Jiri Svoboda <jiri@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
f303afc6
Parents:
e2172284
git-author:
Jiri Svoboda <jiri@…> (2018-03-26 22:28:32)
git-committer:
Jiri Svoboda <jiri@…> (2018-03-27 06:48:39)
Message:

Yet more magic.

File:
1 edited

Legend:

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

    re2172284 rbf2042f9  
    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            cas_link(psrc_head, join_node, N_CONST, join_node, N_INVALID);
     2044#endif
    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.