Opened 6 years ago

Closed 6 years ago

#741 closed defect (fixed)

Clang build broken in RCU with stdatomic

Reported by: Jiri Svoboda Owned by: Jiří Zárevúcky
Priority: major Milestone: 0.8.0
Component: helenos/unspecified Version: mainline
Keywords: Cc:
Blocker for: Depends on:
See also:

Description

Building amd64 profile with compiler changed to clang (clang-6.0) I get the following build error in kernel RCU:

generic/src/synch/rcu.c:665:6: error: address argument to atomic operation must
      be a pointer to _Atomic type ('rcu_item_t ***' (aka 'struct rcu_item ***')
      invalid)
            local_atomic_exchange(&r->parriving_cbs_tail, &rcu_item->next);
            ^                     ~~~~~~~~~~~~~~~~~~~~~~
generic/include/atomic.h:70:2: note: expanded from macro 'local_atomic_exchange'
        atomic_exchange_explicit(var_addr, new_val, memory_order_relaxed)
        ^                        ~~~~~~~~
/usr/lib64/clang/6.0.1/include/stdatomic.h:138:34: note: expanded from macro
      'atomic_exchange_explicit'
#define atomic_exchange_explicit __c11_atomic_exchange
                                 ^

Change History (3)

comment:1 by Jiří Zárevúcky, 6 years ago

Mostly fixed as of 8591b31. Now waiting for sycek bugfix. :)

comment:2 by Jiri Svoboda, 6 years ago

Ccheck now suports _Atomic as of the current Sycek revision.

comment:3 by Jakub Jermář, 6 years ago

Resolution: fixed
Status: assignedclosed
Note: See TracTickets for help on using tickets.