Mixes for Privacy and Anonymity in the Internet
Public Member Functions | Protected Attributes | Friends | List of all members
CAMutex Class Reference
Inheritance diagram for CAMutex:
CAConditionVariable

Public Member Functions

 CAMutex ()
 
virtual ~CAMutex ()
 
SINT32 lock ()
 
SINT32 unlock ()
 

Protected Attributes

CASemaphore * m_pMutex
 

Friends

class CAConditionVariable
 

Constructor & Destructor Documentation

◆ CAMutex()

CAMutex::CAMutex ( )

◆ ~CAMutex()

CAMutex::~CAMutex ( )
virtual

References m_pMutex.

Member Function Documentation

◆ lock()

SINT32 CAMutex::lock ( )

References E_SUCCESS, E_UNKNOWN, and m_pMutex.

Referenced by CAAccountingInstance::__newSettlementTransaction(), CASocket::accept(), CASocketGroupEpoll::add(), CASocketGroup::add(), CALastMixBChannelList::add(), CAQueue::add(), CACacheLoadBalancing::add(), CAMiddleMixChannelList::add(), CAFirstMixChannelList::add(), CAFirstMixChannelList::addChannel(), CAThreadPool::addRequest(), CAConditionVariable::broadcast(), CAMuxSocket::CAMuxSocket(), CATempIPBlockList::checkIP(), CAAccountingDBInterface::checkOwner(), CAFirstMixA::checkUserConnections(), CAQueue::clean(), CAAccountingInstance::cleanupTableEntry(), CATempIPBlockList::cleanupThreadMainLoop(), CASocket::close(), CASocket::create(), CAChainTable::createEntry(), CAFirstMixChannelList::decDelayBuckets(), CAFirstMix::decNewConnections(), CAControlChannelDispatcher::decryptMessage(), CAControlChannelDispatcher::deleteAllControlChannels(), CAChainTable::deleteEntry(), CAThreadPool::destroy(), CAControlChannelDispatcher::encryptMessage(), CAAccountingInstance::finishLoginProcess(), fml_loopDelayBuckets(), CAFirstMixChannelList::forceKickout(), CALastMixBChannelList::get(), CAQueue::get(), CAFirstMixChannelList::get(), tUINT32withLock::getAndzero(), CAAccountingDBInterface::getConnection(), CAChainTable::getEntry(), CAFirstMixChannelList::getFirst(), CAChainTable::getFirstEntry(), CASocketAddrINet::getHostName(), CAMiddleMixChannelList::getInToOut(), CASocketAddrINet::getLocalHostIP(), CASocketAddrINet::getLocalHostName(), CAFirstMixChannelList::getNext(), CAChainTable::getNextEntry(), CAAccountingInstance::getNrOfUsers(), CAQueue::getOrWait(), CAChainTable::getSize(), CAAccountingInstance::handleAccountCertificate_internal(), CAAccountingInstance::handleChallengeResponse_internal(), CAAccountingInstance::handleCostConfirmation_internal(), CAAccountingInstance::handleJapPacket_internal(), CAFirstMixChannelList::hasDelayBuckets(), tUINT32withLock::inc(), CAFirstMix::incNewConnections(), CAInfoService::InfoLoop(), CADatabase::insert(), CAReplayDatabase::insert(), CAIPList::insertIP(), CATempIPBlockList::insertIP(), iplist_loopDoLogCountries(), CAFirstMixChannelList::isKickoutForced(), isLoginOngoing(), CAFirstMixChannelList::isTimedOut(), CALockAble::lock(), CAAccountingInstance::loginProcessStatus(), CAFirstMixA::loop(), CAAccountingSettleThread::mainLoop(), CADatabase::nextClock(), CAReplayDatabase::nextClock(), CALibProxytest::openssl_locking_callback(), parseDOMDocument(), CAQueue::peek(), CAFirstMixChannelList::popTimeoutEntry(), CAMuxSocket::prepareForSend(), CAMsg::printMsg(), CAControlChannelDispatcher::proccessMixPacket(), CAAccountingInstance::processJapMessageLoginHelper(), CAAccountingInstance::processThread(), CAFirstMixChannelList::pushTimeoutEntry(), CAMuxSocket::receive(), CAControlChannelDispatcher::registerControlChannel(), CAAccountingDBInterface::releaseConnection(), releaseDOMParser(), CASocketGroupEpoll::remove(), CAQueue::remove(), CASocketGroup::remove(), CAMiddleMixChannelList::remove(), CAFirstMixChannelList::remove(), CAFirstMixChannelList::removeChannel(), CAControlChannelDispatcher::removeControlChannel(), CALastMixBChannelList::removeFromTable(), CAIPList::removeIP(), resetLoginOngoing(), CASocketGroupEpoll::select(), CASocketGroup::select(), CAMuxSocket::send(), CAControlChannelDispatcher::sendMessages(), CASocketAddrINet::setAddr(), CAMuxSocket::setCrypt(), CAFirstMixChannelList::setDelayParameters(), CAFirstMixChannelList::setKickoutForced(), CAAccountingInstance::setPrepaidBytesToZero(), CAAccountingSettleThread::settle(), CAAccountingInstance::settlementTransaction(), CAInfoService::signal(), CAConditionVariable::signal(), CADatabase::simulateInsert(), CAReplayDatabase::simulateInsert(), CAInfoService::stop(), CAAccountingDBInterface::testAndResetOwner(), testAndSetLoginOwner(), CAAccountingDBInterface::testAndSetOwner(), testLoginEntryOwner(), CALockAble::unlock(), CAAccountingInstance::unlockLogin(), CAConditionVariable::wait(), CALockAble::waitForDestroy(), worker_thread_main_loop(), CAAccountingInstance::~CAAccountingInstance(), CADatabase::~CADatabase(), CAMiddleMixChannelList::~CAMiddleMixChannelList(), CAMuxSocket::~CAMuxSocket(), CAReplayDatabase::~CAReplayDatabase(), and CATempIPBlockList::~CATempIPBlockList().

◆ unlock()

SINT32 CAMutex::unlock ( )

References E_SUCCESS, E_UNKNOWN, and m_pMutex.

Referenced by CAAccountingInstance::__newSettlementTransaction(), CASocket::accept(), CASocketGroupEpoll::add(), CASocketGroup::add(), CALastMixBChannelList::add(), CAQueue::add(), CACacheLoadBalancing::add(), CAMiddleMixChannelList::add(), CAFirstMixChannelList::add(), CAFirstMixChannelList::addChannel(), CAThreadPool::addRequest(), CAConditionVariable::broadcast(), CAMuxSocket::CAMuxSocket(), CATempIPBlockList::checkIP(), CAAccountingDBInterface::checkOwner(), CAFirstMixA::checkUserConnections(), CAQueue::clean(), CAAccountingInstance::cleanupTableEntry(), CATempIPBlockList::cleanupThreadMainLoop(), CASocket::close(), CASocket::create(), CAChainTable::createEntry(), CAFirstMixChannelList::decDelayBuckets(), CAFirstMix::decNewConnections(), CAControlChannelDispatcher::decryptMessage(), CAControlChannelDispatcher::deleteAllControlChannels(), CAChainTable::deleteEntry(), CAThreadPool::destroy(), CAControlChannelDispatcher::encryptMessage(), CAAccountingInstance::finishLoginProcess(), fml_loopDelayBuckets(), CAFirstMixChannelList::forceKickout(), CALastMixBChannelList::get(), CAQueue::get(), CAFirstMixChannelList::get(), tUINT32withLock::getAndzero(), CAAccountingDBInterface::getConnection(), CAChainTable::getEntry(), CAFirstMixChannelList::getFirst(), CAChainTable::getFirstEntry(), CASocketAddrINet::getHostName(), CAMiddleMixChannelList::getInToOut(), CASocketAddrINet::getLocalHostIP(), CASocketAddrINet::getLocalHostName(), CAFirstMixChannelList::getNext(), CAChainTable::getNextEntry(), CAAccountingInstance::getNrOfUsers(), CAQueue::getOrWait(), CAChainTable::getSize(), CAAccountingInstance::handleAccountCertificate_internal(), CAAccountingInstance::handleChallengeResponse_internal(), CAAccountingInstance::handleCostConfirmation_internal(), CAAccountingInstance::handleJapPacket_internal(), CAFirstMixChannelList::hasDelayBuckets(), tUINT32withLock::inc(), CAFirstMix::incNewConnections(), CAInfoService::InfoLoop(), CADatabase::insert(), CAReplayDatabase::insert(), CAIPList::insertIP(), CATempIPBlockList::insertIP(), iplist_loopDoLogCountries(), CAFirstMixChannelList::isKickoutForced(), isLoginOngoing(), CAFirstMixChannelList::isTimedOut(), CALockAble::lock(), CAAccountingInstance::loginProcessStatus(), CAFirstMixA::loop(), CAAccountingSettleThread::mainLoop(), CADatabase::nextClock(), CAReplayDatabase::nextClock(), CALibProxytest::openssl_locking_callback(), parseDOMDocument(), CAQueue::peek(), CAFirstMixChannelList::popTimeoutEntry(), CAMuxSocket::prepareForSend(), CAMsg::printMsg(), CAControlChannelDispatcher::proccessMixPacket(), CAAccountingInstance::processJapMessageLoginHelper(), CAAccountingInstance::processThread(), CAFirstMixChannelList::pushTimeoutEntry(), CAMuxSocket::receive(), CAControlChannelDispatcher::registerControlChannel(), CAAccountingDBInterface::releaseConnection(), releaseDOMParser(), CASocketGroupEpoll::remove(), CAQueue::remove(), CASocketGroup::remove(), CAMiddleMixChannelList::remove(), CAFirstMixChannelList::remove(), CAFirstMixChannelList::removeChannel(), CAControlChannelDispatcher::removeControlChannel(), CALastMixBChannelList::removeFromTable(), CAIPList::removeIP(), resetLoginOngoing(), CAAccountingInstance::returnKickout(), CAAccountingInstance::returnPrepareKickout(), CASocketGroupEpoll::select(), CASocketGroup::select(), CAMuxSocket::send(), CAControlChannelDispatcher::sendMessages(), CASocketAddrINet::setAddr(), CAMuxSocket::setCrypt(), CAFirstMixChannelList::setDelayParameters(), CAFirstMixChannelList::setKickoutForced(), CAAccountingInstance::setPrepaidBytesToZero(), CAAccountingSettleThread::settle(), CAAccountingInstance::settlementTransaction(), CAInfoService::signal(), CAConditionVariable::signal(), CADatabase::simulateInsert(), CAReplayDatabase::simulateInsert(), CAInfoService::stop(), CAAccountingDBInterface::testAndResetOwner(), testAndSetLoginOwner(), CAAccountingDBInterface::testAndSetOwner(), testLoginEntryOwner(), CALockAble::unlock(), CAAccountingInstance::unlockLogin(), CAConditionVariable::wait(), CALockAble::waitForDestroy(), worker_thread_main_loop(), CAAccountingInstance::~CAAccountingInstance(), CADatabase::~CADatabase(), CAMiddleMixChannelList::~CAMiddleMixChannelList(), CAMuxSocket::~CAMuxSocket(), CAReplayDatabase::~CAReplayDatabase(), and CATempIPBlockList::~CATempIPBlockList().

Friends And Related Function Documentation

◆ CAConditionVariable

friend class CAConditionVariable
friend

Member Data Documentation

◆ m_pMutex

CASemaphore* CAMutex::m_pMutex
protected