mirror of
https://github.com/panda3d/panda3d.git
synced 2025-09-30 16:58:40 -04:00
Fix compilation when building without threads enabled
This commit is contained in:
parent
3db8ce2562
commit
4f299fa71f
@ -283,6 +283,31 @@ GeomVertexArrayDataHandle(CPT(GeomVertexArrayData) object,
|
||||
#endif
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
INLINE GeomVertexArrayDataHandle::
|
||||
GeomVertexArrayDataHandle(const GeomVertexArrayData *object,
|
||||
Thread *current_thread) :
|
||||
_object((GeomVertexArrayData *)object),
|
||||
_current_thread(current_thread),
|
||||
_cdata((GeomVertexArrayData::CData *)object->_cycler.read_unlocked(current_thread)),
|
||||
_writable(false)
|
||||
{
|
||||
#ifdef _DEBUG
|
||||
nassertv(_object->test_ref_count_nonzero());
|
||||
#endif // _DEBUG
|
||||
#ifdef DO_PIPELINING
|
||||
_cdata->ref();
|
||||
#endif // DO_PIPELINING
|
||||
// We must grab the lock *after* we have incremented the reference count,
|
||||
// above.
|
||||
_cdata->_rw_lock.acquire();
|
||||
#ifdef DO_MEMORY_USAGE
|
||||
MemoryUsage::update_type(this, get_class_type());
|
||||
#endif
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
@ -309,6 +334,31 @@ GeomVertexArrayDataHandle(PT(GeomVertexArrayData) object,
|
||||
#endif
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
INLINE GeomVertexArrayDataHandle::
|
||||
GeomVertexArrayDataHandle(GeomVertexArrayData *object,
|
||||
Thread *current_thread) :
|
||||
_object(object),
|
||||
_current_thread(current_thread),
|
||||
_cdata(object->_cycler.write_upstream(true, current_thread)),
|
||||
_writable(true)
|
||||
{
|
||||
#ifdef _DEBUG
|
||||
nassertv(_object->test_ref_count_nonzero());
|
||||
#endif // _DEBUG
|
||||
#ifdef DO_PIPELINING
|
||||
_cdata->ref();
|
||||
#endif // DO_PIPELINING
|
||||
// We must grab the lock *after* we have incremented the reference count,
|
||||
// above.
|
||||
_cdata->_rw_lock.acquire();
|
||||
#ifdef DO_MEMORY_USAGE
|
||||
MemoryUsage::update_type(this, get_class_type());
|
||||
#endif
|
||||
}
|
||||
|
||||
/**
|
||||
* Don't attempt to copy these objects.
|
||||
*/
|
||||
|
@ -250,8 +250,12 @@ class EXPCL_PANDA_GOBJ GeomVertexArrayDataHandle : public ReferenceCount, public
|
||||
private:
|
||||
INLINE GeomVertexArrayDataHandle(CPT(GeomVertexArrayData) object,
|
||||
Thread *current_thread);
|
||||
INLINE GeomVertexArrayDataHandle(const GeomVertexArrayData *object,
|
||||
Thread *current_thread);
|
||||
INLINE GeomVertexArrayDataHandle(PT(GeomVertexArrayData) object,
|
||||
Thread *current_thread);
|
||||
INLINE GeomVertexArrayDataHandle(GeomVertexArrayData *object,
|
||||
Thread *current_thread);
|
||||
INLINE GeomVertexArrayDataHandle(const GeomVertexArrayDataHandle &);
|
||||
INLINE void operator = (const GeomVertexArrayDataHandle &);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user