//@endcond
- //cds::gc::HP::thread_gc_impl * m_hpManager ; ///< Michael's Hazard Pointer GC thread-specific data
- //cds::gc::DHP::thread_gc_impl * m_dhpManager ; ///< Dynamic Hazard Pointer GC thread-specific data
-
size_t m_nFakeProcessorNumber ; ///< fake "current processor" number
//@cond
sigact.sa_sigaction = signal_handler;
sigact.sa_flags = SA_SIGINFO;
sigemptyset( &sigact.sa_mask );
- //sigaddset( &sigact.sa_mask, m_nSigNo );
sigaction( m_nSigNo, &sigact, nullptr );
sigaddset( &sigact.sa_mask, m_nSigNo );
inline void sh_singleton<RCUtag>::clear_signal_handler()
{}
- template <typename RCUtag>
- void sh_singleton<RCUtag>::signal_handler( int /*signo*/, siginfo_t * /*sigInfo*/, void * /*context*/ )
- {
- thread_record * pRec = cds::threading::getRCU<RCUtag>();
- if ( pRec ) {
- atomics::atomic_signal_fence( atomics::memory_order_acquire );
- pRec->m_bNeedMemBar.store( false, atomics::memory_order_relaxed );
- atomics::atomic_signal_fence( atomics::memory_order_release );
- }
- }
-
template <typename RCUtag>
inline void sh_singleton<RCUtag>::raise_signal( cds::OS::ThreadId tid )
{
public:
sh_thread_gc();
~sh_thread_gc();
+
public:
static void access_lock();
static void access_unlock();
typedef sh_singleton_instance< rcu_tag > rcu_instance;
protected:
- atomics::atomic<uint32_t> m_nGlobalControl;
- thread_list< rcu_tag > m_ThreadList;
- int const m_nSigNo;
+ atomics::atomic<uint32_t> m_nGlobalControl;
+ thread_list< rcu_tag > m_ThreadList;
+ int const m_nSigNo;
protected:
sh_singleton( int nSignal )
template<> CDS_EXPORT_API singleton_vtbl * sh_singleton_instance< signal_buffered_tag >::s_pRCU = nullptr;
template<> CDS_EXPORT_API singleton_vtbl * sh_singleton_instance< signal_threaded_tag >::s_pRCU = nullptr;
+ template <>
+ void sh_singleton<signal_buffered_tag>::signal_handler( int /*signo*/, siginfo_t * /*sigInfo*/, void * /*context*/ )
+ {
+ thread_record * pRec = cds::threading::getRCU<signal_buffered_tag>();
+ if ( pRec ) {
+ atomics::atomic_signal_fence( atomics::memory_order_acquire );
+ pRec->m_bNeedMemBar.store( false, atomics::memory_order_relaxed );
+ atomics::atomic_signal_fence( atomics::memory_order_release );
+ }
+ }
+
+ template <>
+ void sh_singleton<signal_threaded_tag>::signal_handler( int /*signo*/, siginfo_t * /*sigInfo*/, void * /*context*/ )
+ {
+ thread_record * pRec = cds::threading::getRCU<signal_threaded_tag>();
+ if ( pRec ) {
+ atomics::atomic_signal_fence( atomics::memory_order_acquire );
+ pRec->m_bNeedMemBar.store( false, atomics::memory_order_relaxed );
+ atomics::atomic_signal_fence( atomics::memory_order_release );
+ }
+ }
+
+
}}} // namespace cds::urcu::details
#endif //#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED