Get threads to deal with exit conditions, create timestamps
[matches/MCTX3420.git] / server / thread.h
1 /**
2  * @file thread.h
3  * @purpose Declarations for thread control related functions and variables
4  */
5
6 #ifndef _THREAD_H
7 #define _THREAD_H
8
9 #include "common.h"
10 #include <pthread.h>
11
12 typedef enum {QUIT, QUIT_ERROR, RUNNING} Runstate;
13
14 /** Determine if the thread should exit; to be called periodically **/
15 extern Runstate Thread_Runstate();
16 /** Tell all other threads (when they call Thread_ExitCondition) to exit. Repeated calls have no effect. **/
17 extern void Thread_QuitProgram(bool error);
18
19 #endif //_THREAD_H
20
21 //EOF

UCC git Repository :: git.ucc.asn.au