summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'src/server/communication_thread.c')
-rw-r--r--src/server/communication_thread.c33
1 files changed, 30 insertions, 3 deletions
diff --git a/src/server/communication_thread.c b/src/server/communication_thread.c
index 2da54d2..e226f17 100644
--- a/src/server/communication_thread.c
+++ b/src/server/communication_thread.c
@@ -4,20 +4,24 @@
/**** RELABSD *****************************************************************/
#include <relabsd/debug.h>
+#include <relabsd/server.h>
/******************************************************************************/
/**** LOCAL FUNCTIONS *********************************************************/
/******************************************************************************/
+/* TODO: implement. */
+/*
void main_loop (struct relabsd_server server [const static 1])
{
-
}
+*/
void * posix_main_loop (void * params)
{
- main_loop((struct relabsd_server *) params);
+ /* main_loop((struct relabsd_server *) params);*/
+ params = NULL;
- return NULL;
+ return params;
}
/******************************************************************************/
@@ -52,3 +56,26 @@ int relabsd_server_create_communication_thread
return 0;
}
+
+int relabsd_server_join_communication_thread
+(
+ struct relabsd_server server [const static 1]
+)
+{
+ int err;
+
+ err = pthread_join(server->communication_thread, (void **) NULL);
+
+ if (err != 0)
+ {
+ RELABSD_FATAL
+ (
+ "Unable to join with the communication thread: %s",
+ strerror(err)
+ );
+
+ return -1;
+ }
+
+ return 0;
+}