#include <OSGLock.h>
Inheritance diagram for osg::LockPool:

Public Types | |
| typedef MPLockPoolType | Type |
Public Member Functions | |
Lock | |
| *void | aquire (void *keyP) |
| void | release (void *keyP) |
| bool | request (void *keyP) |
Get | |
| *virtual MPType & | getType (void) |
| virtual const MPType & | getType (void) const |
| UInt32 | getTypeId (void) |
| const Char8 * | getCName (void) const |
Reference Counting | |
| *void | addRef (void) |
| void | subRef (void) |
| Int32 | getRefCount (void) |
Static Public Member Functions | |
Get | |
| *static LockPool * | get (const Char8 *szName) |
| static LockPool * | find (const Char8 *szName) |
| static LockPool * | create (void) |
Class Get | |
| *static const MPType & | getStaticType (void) |
| static UInt32 | getStaticTypeId (void) |
Protected Types | |
| typedef LockCommonBase | Inherited |
Protected Member Functions | |
Constructor | |
| * | LockPool (const Char8 *szName, UInt32 uiId) |
Destructor | |
| *virtual | ~LockPool (void) |
Construction | |
| *bool | init (void) |
Destruction | |
| *void | shutdown (void) |
Static Protected Member Functions | |
Create | |
| *static LockPool * | create (const Char8 *szName, UInt32 uiId) |
Protected Attributes | |
| Lock | _pLocks [uiLockPoolSize] |
| UInt32 | _uiLockId |
Class Specific | |
| Char8 * | _szName |
Static Protected Attributes | |
| static MPLockPoolType | _type |
Private Member Functions | |
| LockPool (const LockPool &source) | |
| prohibit default function (move to 'public' if needed) | |
| void | operator= (const LockPool &source) |
| prohibit default function (move to 'public' if needed) | |
Friends | |
| class | MPFieldStore< LockPool > |
Definition at line 463 of file OSGLock.h.
|
|
|
|
|
Reimplemented from osg::LockCommonBase. |
|
||||||||||||
|
Definition at line 572 of file OSGLock.cpp. Referenced by create(). 00573 : 00574 Inherited(szName, uiId) 00575 { 00576 }
|
|
|
Definition at line 580 of file OSGLock.cpp. References osg::ThreadManager::removeLockPool(), shutdown(), and osg::ThreadManager::the(). 00581 { 00582 ThreadManager::the()->removeLockPool(this); 00583 00584 shutdown(); 00585 }
|
|
|
|
|
|
Definition at line 513 of file OSGLock.cpp. References osg::ThreadManager::getLockPool(), and osg::ThreadManager::the(). Referenced by create(). 00514 { 00515 return ThreadManager::the()->getLockPool(szName, "OSGLockPool"); 00516 }
|
|
|
Definition at line 518 of file OSGLock.cpp. References osg::ThreadManager::findLockPool(), and osg::ThreadManager::the(). 00519 { 00520 return ThreadManager::the()->findLockPool(szName); 00521 }
|
|
|
Definition at line 523 of file OSGLock.cpp. References get(). 00524 { 00525 return LockPool::get(NULL); 00526 }
|
|
|
Definition at line 534 of file OSGLock.cpp. References _pLocks, osg::Lock::aquire(), and osg::uiLockPoolMask. Referenced by osg::FieldContainerPtrBase::addRef(), and osg::FieldContainerPtrBase::subRef(). 00535 { 00536 _pLocks[(UInt64(keyP) & uiLockPoolMask) >> 7].aquire(); 00537 }
|
|
|
Definition at line 539 of file OSGLock.cpp. References _pLocks, osg::Lock::release(), and osg::uiLockPoolMask. Referenced by osg::FieldContainerPtrBase::addRef(), and osg::FieldContainerPtrBase::subRef(). 00540 { 00541 _pLocks[(UInt64(keyP) & uiLockPoolMask) >> 7].release(); 00542 }
|
|
|
Definition at line 544 of file OSGLock.cpp. References _pLocks, osg::Lock::request(), and osg::uiLockPoolMask. 00545 { 00546 return _pLocks[(UInt64(keyP) & uiLockPoolMask) >> 7].request(); 00547 }
|
|
||||||||||||
|
Definition at line 555 of file OSGLock.cpp. References init(), and LockPool(). 00556 { 00557 LockPool *returnValue = NULL; 00558 00559 returnValue = new LockPool(szName, uiId); 00560 00561 if(returnValue->init() == false) 00562 { 00563 delete returnValue; 00564 returnValue = NULL; 00565 } 00566 00567 return returnValue; 00568 }
|
|
|
Definition at line 589 of file OSGLock.cpp. References _pLocks, osg::MPBase::_szName, osg::PThreadLockBase::init(), osg::stringDup(), and osg::uiLockPoolSize. Referenced by create(). 00590 { 00591 bool returnValue = true; 00592 Char8 *pTmp; 00593 00594 pTmp = new Char8[strlen(_szName) + 6]; 00595 00596 for(UInt32 i = 0; i < uiLockPoolSize; i++) 00597 { 00598 #ifdef OSG_DEBUG_LOCK_STAT 00599 _pLockStats[i] = 0; 00600 #endif 00601 sprintf(pTmp, "%s%u\n", _szName, i); 00602 00603 stringDup(pTmp, _pLocks[i]._szName); 00604 00605 returnValue &= _pLocks[i].init(); 00606 } 00607 00608 delete [] pTmp; 00609 00610 return returnValue; 00611 }
|
|
|
Definition at line 615 of file OSGLock.cpp. References _pLocks, osg::PThreadLockBase::shutdown(), and osg::uiLockPoolSize. Referenced by ~LockPool(). 00616 { 00617 for(UInt32 i = 0; i < uiLockPoolSize; i++) 00618 { 00619 _pLocks[i].shutdown(); 00620 } 00621 }
|
|
|
|
|
|
Definition at line 253 of file OSGMPBase.cpp. References osg::MPBase::_type. 00254 { 00255 return _type; 00256 }
|
|
|
Definition at line 259 of file OSGMPBase.cpp.
|
|
|
Definition at line 265 of file OSGMPBase.cpp. References osg::MPBase::_type. Referenced by osg::MPBase::getTypeId(). 00266 { 00267 return _type; 00268 }
|
|
|
Definition at line 271 of file OSGMPBase.cpp. References osg::MPBase::_type. 00272 { 00273 return _type; 00274 }
|
|
|
Definition at line 277 of file OSGMPBase.cpp. References osg::TypeBase::getId(), and osg::MPBase::getType().
|
|
|
Definition at line 283 of file OSGMPBase.cpp. References osg::MPBase::_szName. 00284 { 00285 return _szName; 00286 }
|
|
|
Definition at line 64 of file OSGMemoryObject.cpp. References osg::MemoryObject::_refCount. Referenced by osg::SharedObjectHandler::getSharedObject(), and osg::SharedObjectHandler::initialize(). 00065 { 00066 _refCount++; 00067 }
|
|
|
Definition at line 69 of file OSGMemoryObject.cpp. References osg::MemoryObject::_refCount.
|
|
|
Definition at line 77 of file OSGMemoryObject.cpp. References osg::MemoryObject::_refCount. 00078 { 00079 return _refCount; 00080 }
|
|
|
|
|
|
Reimplemented from osg::MPBase. |
|
|
Definition at line 497 of file OSGLock.h. Referenced by aquire(), init(), release(), request(), and shutdown(). |
|
|
|
|
|
Definition at line 406 of file OSGMPBase.h. Referenced by osg::MPBase::getCName(), init(), osg::MPBase::MPBase(), osg::BasePThreadBase::print(), and osg::MPBase::~MPBase(). |
1.4.3