diff options
author | Mattias Andrée <maandree@operamail.com> | 2014-05-18 07:08:32 +0200 |
---|---|---|
committer | Mattias Andrée <maandree@operamail.com> | 2014-05-18 07:08:32 +0200 |
commit | 1936e97603ba95ae2f657208349ef072039aca8c (patch) | |
tree | 87c5cfd2ef5e5f77f8d1ba1723013988af9a2b1c /src/mds-server/client.h | |
parent | style + reduce code complexity (diff) | |
download | mds-1936e97603ba95ae2f657208349ef072039aca8c.tar.gz mds-1936e97603ba95ae2f657208349ef072039aca8c.tar.bz2 mds-1936e97603ba95ae2f657208349ef072039aca8c.tar.xz |
reduce code complexity
Signed-off-by: Mattias Andrée <maandree@operamail.com>
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 |