]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
spinlock: add generic spinlock implementation 1008/head
authorNoah Watkins <noahwatkins@gmail.com>
Sun, 21 Jul 2013 01:41:40 +0000 (18:41 -0700)
committerNoah Watkins <noahwatkins@gmail.com>
Sat, 28 Dec 2013 22:43:14 +0000 (14:43 -0800)
commit1fec818f7cb7d70af3800643dbf8164ac8efa45a
treee63de62b8f1def61ffb2d36bbcdecbde33caeff7
parent23f715ba82ab3295c60c593f8ea9c1e5167e8eef
spinlock: add generic spinlock implementation

Adds a ceph_spinlock_t implementation that will use pthread_spinlock_t
if available, and otherwise reverts to pthread_mutex_t. Note that this
spinlock is not intended to be used in process-shared memory.

Switches implementation in:

  ceph_context
  SimpleMessenger
  atomic_t

Only ceph_context initialized its spinlock with PTHREAD_PROCESS_SHARED.
However, there does not appear to be any instance in which CephContext
is allocated in shared memory, and thus can use the default private
memory space behavior.

Signed-off-by: Noah Watkins <noahwatkins@gmail.com>
configure.ac
src/common/ceph_context.cc
src/common/ceph_context.h
src/include/Spinlock.h
src/include/atomic.h
src/msg/SimpleMessenger.cc
src/msg/SimpleMessenger.h