Mixe for Privacy and Anonymity in the Internet
Public Member Functions | Private Attributes | List of all members
tUINT32withLock Class Reference

#include <CAFirstMix.hpp>

Collaboration diagram for tUINT32withLock:

Public Member Functions

 tUINT32withLock ()
 
void inc ()
 
int getAndzero ()
 

Private Attributes

volatile UINT32 value
 
CAMutex lock
 

Detailed Description

Definition at line 85 of file CAFirstMix.hpp.

Constructor & Destructor Documentation

◆ tUINT32withLock()

tUINT32withLock::tUINT32withLock ( )
inline

Definition at line 91 of file CAFirstMix.hpp.

92  {
93  value=0;
94  }
volatile UINT32 value
Definition: CAFirstMix.hpp:88

References value.

Member Function Documentation

◆ getAndzero()

int tUINT32withLock::getAndzero ( )
inline

Definition at line 102 of file CAFirstMix.hpp.

103  {
104  UINT32 tmp;
105  lock.lock();
106  tmp=value;
107  value=0;
108  lock.unlock();
109  return tmp;
110  }
unsigned int UINT32
Definition: basetypedefs.h:131
SINT32 unlock()
Definition: CAMutex.hpp:52
SINT32 lock()
Definition: CAMutex.hpp:41

References lock, CAMutex::lock(), CAMutex::unlock(), and value.

Here is the call graph for this function:

◆ inc()

void tUINT32withLock::inc ( )
inline

Definition at line 95 of file CAFirstMix.hpp.

96  {
97  lock.lock();
98  value++;
99  lock.unlock();
100  }

References lock, CAMutex::lock(), CAMutex::unlock(), and value.

Referenced by CAFirstMixA::loop(), and CAFirstMixB::loop().

Here is the call graph for this function:
Here is the caller graph for this function:

Member Data Documentation

◆ lock

CAMutex tUINT32withLock::lock
private

Definition at line 89 of file CAFirstMix.hpp.

Referenced by getAndzero(), and inc().

◆ value

volatile UINT32 tUINT32withLock::value
private

Definition at line 88 of file CAFirstMix.hpp.

Referenced by getAndzero(), inc(), and tUINT32withLock().


The documentation for this class was generated from the following file: