diff options
Diffstat (limited to '')
-rw-r--r-- | src/mds-server/client.h | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/src/mds-server/client.h b/src/mds-server/client.h index 2aeb813..39ed791 100644 --- a/src/mds-server/client.h +++ b/src/mds-server/client.h @@ -137,6 +137,38 @@ typedef struct client /** + * Initialise a client + * + * The following fields will not be initialised: + * - message + * - thread + * - mutex + * - modify_mutex + * - modify_cond + * + * The follow fields will be initialised to `-1`: + * - list_entry + * - socket_fd + * + * @param this Memory slot in which to store the new client information + */ +void client_initialise(client_t* restrict this); + +/** + * Initialise fields that have to do with threading + * + * This method initialises the following fields: + * - thread + * - mutex + * - modify_mutex + * - modify_cond + * + * @param this The client information + * @return Zero on success, -1 on error + */ +int client_initialise_threading(client_t* restrict this); + +/** * Release all resources assoicated with a client * * @param this The client information |