GDBMS 1.0
|
#include <file_semaphore.h>
Public Member Functions | |
file_semaphore (char *path_to_file) | |
A constructor. | |
~file_semaphore () | |
void | getResource () |
Get resource of mutex. | |
void | freeResource () |
Free the resourse. |
Definition at line 1 of file file_semaphore.h.
file_semaphore::file_semaphore | ( | char * | path_to_file | ) |
A constructor.
path_to_file | path to a semaphore file |
The full file path uniquely identifies a single cross thread mutex.
Definition at line 20 of file file_semaphore.cpp.
file_semaphore::~file_semaphore | ( | ) |
Definition at line 195 of file file_semaphore.cpp.
void file_semaphore::freeResource | ( | ) |
Free the resourse.
The semaphore file is deleted, in order to make the resource available for other threads/processes.
Definition at line 128 of file file_semaphore.cpp.
void file_semaphore::getResource | ( | ) |
Get resource of mutex.
The function sleeps until the resource is available.
Definition at line 26 of file file_semaphore.cpp.