__HAVE_ARCH_CMPXCHG is not defined in cmpxcgh.h which causes rt_spin_lock() to always take the slow path. The attached patch fixes this issue.