3 #ifndef CDSLIB_LOCK_SPINLOCK_H
4 #define CDSLIB_LOCK_SPINLOCK_H
6 #if CDS_COMPILER == CDS_COMPILER_MSVC
7 # pragma message("cds/lock/spinlock.h is deprecated, use cds/sync/spinlock.h instead")
9 # warning "cds/lock/spinlock.h is deprecated, use cds/sync/spinlock.h instead"
12 #include <cds/sync/spinlock.h>
16 /// Synchronization primitives (deprecated namespace, use \p cds::sync namespace instead)
19 /// Alias for \p cds::sync::spin_lock for backward compatibility
20 template <typename Backoff>
21 using Spinlock = cds::sync::spin_lock< Backoff >;
23 /// Spin-lock implementation default for the current platform
24 typedef cds::sync::spin_lock< backoff::LockDefault> Spin;
26 /// Alias for \p cds::sync::reentrant_spin_lock for backward compatibility
27 template <typename Integral, class Backoff>
28 using ReentrantSpinT = cds::sync::reentrant_spin_lock< Integral, Backoff >;
30 /// Recursive 32bit spin-lock
31 typedef cds::sync::reentrant_spin32 ReentrantSpin32;
33 /// Recursive 64bit spin-lock
34 typedef cds::sync::reentrant_spin64 ReentrantSpin64;
36 /// Default recursive spin-lock type
37 typedef ReentrantSpin32 ReentrantSpin;
41 /// Standard (best for the current platform) spin-lock implementation
42 typedef lock::Spin SpinLock;
44 /// Standard (best for the current platform) recursive spin-lock implementation
45 typedef lock::ReentrantSpin RecursiveSpinLock;
47 /// 32bit recursive spin-lock shortcut
48 typedef lock::ReentrantSpin32 RecursiveSpinLock32;
50 /// 64bit recursive spin-lock shortcut
51 typedef lock::ReentrantSpin64 RecursiveSpinLock64;
56 #endif // #ifndef CDSLIB_LOCK_SPINLOCK_H