Moved Block, ReentrantMutex and ReadWriteMutex into OpenThreads.
This commit is contained in:
@@ -114,7 +114,7 @@ void ConnectedParticleSystem::reuseParticle(int particleIndex)
|
||||
|
||||
void ConnectedParticleSystem::drawImplementation(osg::State& state) const
|
||||
{
|
||||
osgDB::ScopedReadLock lock(_readWriteMutex);
|
||||
OpenThreads::ScopedReadLock lock(_readWriteMutex);
|
||||
|
||||
const Particle* particle = (_startParticle != Particle::INVALID_INDEX) ? &_particles[_startParticle] : 0;
|
||||
if (!particle) return;
|
||||
|
||||
@@ -64,7 +64,7 @@ void osgParticle::ParticleProcessor::traverse(osg::NodeVisitor& nv)
|
||||
{
|
||||
if (nv.getFrameStamp())
|
||||
{
|
||||
osgDB::ScopedWriteLock lock(*(_ps->getReadWriteMutex()));
|
||||
OpenThreads::ScopedWriteLock lock(*(_ps->getReadWriteMutex()));
|
||||
|
||||
//added- 1/17/06- bgandere@nps.edu
|
||||
//a check to make sure we havent updated yet this frame
|
||||
|
||||
@@ -91,7 +91,7 @@ void osgParticle::ParticleSystem::update(double dt)
|
||||
|
||||
void osgParticle::ParticleSystem::drawImplementation(osg::State& state) const
|
||||
{
|
||||
osgDB::ScopedReadLock lock(_readWriteMutex);
|
||||
OpenThreads::ScopedReadLock lock(_readWriteMutex);
|
||||
|
||||
// update the frame count, so other objects can detect when
|
||||
// this particle system is culled
|
||||
|
||||
@@ -40,7 +40,7 @@ void osgParticle::ParticleSystemUpdater::traverse(osg::NodeVisitor& nv)
|
||||
{
|
||||
ParticleSystem* ps = i->get();
|
||||
|
||||
osgDB::ScopedWriteLock lock(*(ps->getReadWriteMutex()));
|
||||
OpenThreads::ScopedWriteLock lock(*(ps->getReadWriteMutex()));
|
||||
|
||||
if (!ps->isFrozen() && (ps->getLastFrameNumber() >= (nv.getFrameStamp()->getFrameNumber() - 1) || !ps->getFreezeOnCull()))
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user