Exemplo n.º 1
0
 unsigned int size () {
     unsigned int num = 0;
     _mutex.get_shared();
     num = (unsigned int) _runQueue.size() + (unsigned int) _idleQueue.size();
     _mutex.release_shared();
     return num;
 }
Exemplo n.º 2
0
 bool isSystemEDU ( EDUID eduID )
 {
     bool isSys = false ;
     _mutex.get_shared () ;
     isSys = _isSystemEDU ( eduID ) ;
     _mutex.release_shared () ;
     return isSys ;
 }
Exemplo n.º 3
0
 unsigned int sizeSystem ()
 {
     unsigned int num = 0 ;
     _mutex.get_shared () ;
     num = _mapSystemEDUS.size() ;
     _mutex.release_shared () ;
     return num ;
 }
Exemplo n.º 4
0
 ~_ossScopedLock ()
 {
    if ( _slatch )
       ( _mode == EXCLUSIVE ) ? _slatch->release() :
                                _slatch->release_shared() ;
    else if ( _xlatch )
       _xlatch->release () ;
 }
Exemplo n.º 5
0
		EDUID getSystemEDU(EDU_TYPES edu)
		{
			EDUID eduID = PMD_INVALID_EDUID;
			_mutex.get_shared();
			std::map<unsigned int, EDUID>::iterator it = _mapSystemEDUS.find(edu);	
			if (it != _mapSystemEDUS.end()) {
				eduID = it->second;
			}
			_mutex.release_shared();
			return eduID;
		}
Exemplo n.º 6
0
 _ossScopedLock ( ossSLatch *latch, OSS_LATCH_MODE mode) :
       _slatch ( NULL ), _xlatch ( NULL ), _mode ( EXCLUSIVE )
 {
    if ( latch )
    {
       _slatch = latch ;
       _mode = mode ;
       _xlatch = NULL ;
       if ( mode == EXCLUSIVE )
          _slatch->get () ;
       else
          _slatch->get_shared () ;
    }
 }
Exemplo n.º 7
0
 _ossScopedLock ( ossSLatch *latch ) :
       _slatch ( NULL ), _xlatch ( NULL ), _mode ( EXCLUSIVE )
 {
    if ( latch )
    {
       _slatch = latch ;
       _mode = EXCLUSIVE ;
       _xlatch = NULL ;
       _slatch->get () ;
    }
 }
Exemplo n.º 8
0
 void regSystemEDU ( EDU_TYPES edu, EDUID eduid )
 {
     _mutex.get() ;
     _mapSystemEDUS[ edu ] = eduid ;
     _mutex.release () ;
 }