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();
342 #endif // __PCL_AutoViewLock_h