diff options
Diffstat (limited to '')
-rw-r--r-- | src/mds-server/globals.c | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/src/mds-server/globals.c b/src/mds-server/globals.c index 9ee67aa..2030fa7 100644 --- a/src/mds-server/globals.c +++ b/src/mds-server/globals.c @@ -18,16 +18,59 @@ #include "globals.h" +/** + * The program run state, 1 when running, 0 when shutting down + */ volatile sig_atomic_t running = 1; + +/** + * The number of running slaves + */ size_t running_slaves = 0; + +/** + * Mutex for slave data + */ pthread_mutex_t slave_mutex; + +/** + * Condition for slave data + */ pthread_cond_t slave_cond; + +/** + * Map from client socket file descriptor to all information (`client_t`) + */ fd_table_t client_map; + +/** + * List of client information (`client_t`) + */ linked_list_t client_list; + +/** + * The next free ID for a client + */ uint64_t next_client_id = 1; + +/** + * The next free ID for a message modifications + */ uint64_t next_modify_id = 1; + +/** + * Mutex for message modification + */ pthread_mutex_t modify_mutex; + +/** + * Condition for message modification + */ pthread_cond_t modify_cond; + +/** + * Map from modification ID to waiting client + */ hash_table_t modify_map; |