t_semaphore.cpp File Reference

#include <basis/array.cpp>
#include <basis/chaos.h>
#include <basis/guards.h>
#include <basis/istring.h>
#include <mechanisms/ithread.h>
#include <mechanisms/safe_roller.h>
#include <mechanisms/semaphore.h>
#include <mechanisms/time_stamp.h>
#include <loggers/file_logger.h>
#include <opsystem/path_configuration.h>
#include <data_struct/static_memory_gremlin.h>

Include dependency graph for t_semaphore.cpp:

Go to the source code of this file.

Defines

#define LOG(to_print)   log.log(timestamp(true) + istring(to_print))

Functions

int main (int formal(argc), char *formal(argv)[])

Variables

 HOOPLE_STARTUP_CODE
const int DEFAULT_FISH = 64
const int DEFAULT_RUN_TIME = 142000
int concurrent_biters = 0
int grab_lock = 0
const int MAX_GRABBERS = 8
semaphoreguard
bool exit_now = false
const istring LOGFILE_NAME
chaos rando


Define Documentation

#define LOG ( to_print   )     log.log(timestamp(true) + istring(to_print))

Definition at line 64 of file t_semaphore.cpp.


Function Documentation

int main ( int   formal(argc),
char *  formal(argv)[] 
)

Definition at line 126 of file t_semaphore.cpp.

References guards::alert_message(), concurrent_biters, DEFAULT_FISH, DEFAULT_RUN_TIME, exit_now, guard, chaos::inclusive(), array< contents >::length(), LOG, log(), LOGFILE_NAME, MAX_GRABBERS, NIL, rando, and portable::sleep_ms().


Variable Documentation

int concurrent_biters = 0

Definition at line 44 of file t_semaphore.cpp.

const int DEFAULT_FISH = 64

Definition at line 38 of file t_semaphore.cpp.

const int DEFAULT_RUN_TIME = 142000

Definition at line 41 of file t_semaphore.cpp.

bool exit_now = false

Definition at line 57 of file t_semaphore.cpp.

Referenced by main().

int grab_lock = 0

Definition at line 47 of file t_semaphore.cpp.

semaphore* guard

Definition at line 53 of file t_semaphore.cpp.

HOOPLE_STARTUP_CODE

Definition at line 36 of file t_semaphore.cpp.

const istring LOGFILE_NAME

Initial value:

Definition at line 60 of file t_semaphore.cpp.

const int MAX_GRABBERS = 8

Definition at line 50 of file t_semaphore.cpp.

Referenced by main().

chaos rando

Definition at line 67 of file t_semaphore.cpp.


Generated on Fri Sep 5 04:30:13 2008 for HOOPLE Libraries by  doxygen 1.5.1