52 #ifndef __PCL_AutoViewLock_h
53 #define __PCL_AutoViewLock_h
58 #include <pcl/Diagnostics.h>
228 if ( !m_view.IsNull() )
231 if ( m_readLock.TestAndSet( 0, 1 ) )
233 if ( m_writeLock.TestAndSet( 0, 1 ) )
248 if ( !m_view.IsNull() )
251 if ( m_readLock.TestAndSet( 1, 0 ) )
253 if ( m_writeLock.TestAndSet( 1, 0 ) )
268 if ( !m_view.IsNull() )
269 if ( m_writeLock.TestAndSet( 0, 1 ) )
270 m_view.LockForWrite();
281 if ( !m_view.IsNull() )
282 if ( m_readLock.TestAndSet( 1, 0 ) )
283 m_view.UnlockForRead();
294 if ( !m_view.IsNull() )
295 if ( m_readLock.TestAndSet( 0, 1 ) )
296 m_view.RelockForRead();
Atomic operations on integers.
Automatic view lock/unlock.
AutoViewLock(const AutoViewLock &)=delete
AutoViewLock(View &view, bool lock=true)
Automatic write-only view lock/unlock.
AutoViewWriteLock(View &view)
High-level interface to a PixInsight view object.