Project

General

Profile

Bug #13088

a73a4cb breaks "--without-libatomic-ops" (firefly)

Added by Ken Dreyer about 3 years ago. Updated about 3 years ago.

Status:
Resolved
Priority:
Urgent
Assignee:
-
Category:
-
Target version:
-
Start date:
09/14/2015
Due date:
% Done:

0%

Source:
other
Tags:
Backport:
Regression:
No
Severity:
3 - minor
Reviewed:
Affected Versions:
ceph-qa-suite:
Pull request ID:

Description

The following commit causes a build-failure when built "--without-libatomic-ops": https://github.com/ceph/ceph/commit/a73a4cb

"common/RWLock.h:29:11: error: 'atomic_t' does not name a type" 

Associated revisions

Revision 2e09a2c2 (diff)
Added by Sage Weil about 3 years ago

common/RWLock: include assert

Fixes atomic_t build issue without libatomic-ops.

Fixes: #13088
Signed-off-by: Sage Weil <>

History

#1 Updated by Greg Farnum about 3 years ago

That's odd:

#else
/*
 * crappy slow implementation that uses a pthreads spinlock.
 */
#include "include/Spinlock.h" 

namespace ceph {
  typedef atomic_spinlock_t<unsigned> atomic_t;
  typedef atomic_spinlock_t<unsigned long long> atomic64_t;
}

#endif

definitely specifies atomic_t. Unless it's the nested #ifs:

#ifndef NO_ATOMIC_OPS
[ definition goes here...]
#if SIZEOF_AO_T == 8
  typedef atomic_t atomic64_t;
#else
  typedef atomic_spinlock_t<unsigned long long> atomic64_t;
#endif

}

#else
/*
 * crappy slow implementation that uses a pthreads spinlock.
 */

The internet tells me we can nest them, but that's the only thing I can see that might have broken them.

#2 Updated by Sage Weil about 3 years ago

  • Priority changed from Normal to Urgent

#3 Updated by Sage Weil about 3 years ago

  • Subject changed from a73a4cb breaks "--without-libatomic-ops" to a73a4cb breaks "--without-libatomic-ops" (firefly)
  • Status changed from New to Need Review

#4 Updated by Sage Weil about 3 years ago

  • Status changed from Need Review to Resolved

Also available in: Atom PDF