#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 |
| semaphore * | guard |
| bool | exit_now = false |
| const istring | LOGFILE_NAME |
| chaos | rando |
| #define LOG | ( | to_print | ) | log.log(timestamp(true) + istring(to_print)) |
Definition at line 64 of file t_semaphore.cpp.
| 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().
| 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 |
| int grab_lock = 0 |
Definition at line 47 of file t_semaphore.cpp.
| semaphore* guard |
Definition at line 53 of file t_semaphore.cpp.
Definition at line 36 of file t_semaphore.cpp.
| const istring LOGFILE_NAME |
Initial value:
path_configuration::make_logfile_name ("t_semaphore.log")
Definition at line 60 of file t_semaphore.cpp.
| const int MAX_GRABBERS = 8 |
Definition at line 67 of file t_semaphore.cpp.
1.5.1