Mixe for Privacy and Anonymity in the Internet
Classes | Defines | Typedefs | Functions
CADatabase.hpp File Reference
#include "CAMutex.hpp"
#include "CAThread.hpp"
Include dependency graph for CADatabase.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  _t_database_entry
struct  _t_database_info
class  CADatabase

Defines

#define SECONDS_PER_INTERVALL   30
#define FUTURE_TOLERANCE   5

Typedefs

typedef struct _t_database_entry t_databaseEntry
typedef struct _t_database_info t_databaseInfo

Functions

THREAD_RETURN db_loopMaintenance (void *param)

Define Documentation

#define FUTURE_TOLERANCE   5

Definition at line 48 of file CADatabase.hpp.

Referenced by CADatabase::insert().

#define SECONDS_PER_INTERVALL   30

Typedef Documentation


Function Documentation

THREAD_RETURN db_loopMaintenance ( void *  param)

Definition at line 223 of file CADatabase.cpp.

References BEGIN_STACK, FINISH_STACK, INIT_STACK, CADatabase::m_bRun, CADatabase::m_lastSwitch, CADatabase::nextClock(), SECONDS_PER_INTERVALL, sSleep(), and THREAD_RETURN_SUCCESS.

  {
    INIT_STACK;
    BEGIN_STACK("CADatabase::db_loopMaintenance");

    CADatabase* pDatabase=(CADatabase*)param;
    while(pDatabase->m_bRun)
      {
        sSleep(10);
        if (pDatabase->m_lastSwitch+SECONDS_PER_INTERVALL<=time(NULL)) {
          pDatabase->nextClock();
          }
      }

    FINISH_STACK("CADatabase::db_loopMaintenance");

    THREAD_RETURN_SUCCESS;
  }

Here is the call graph for this function: