added signal handler
[NeonServV5.git] / src / main.h
index 6a2a99f575a38f666adb593a2a1b4d9f38b45684..329f391ad4f8c0120c0aed51f8a70f9c0c8de80b 100644 (file)
@@ -21,7 +21,6 @@
 #define NEONSERV_VERSION "5.3"
 #define VERSION_PATCHLEVEL 543
 
-#include <features.h>
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
@@ -31,6 +30,7 @@
 #include <winsock2.h>
 #include <malloc.h>
 #else
+#include <features.h>
 #include <sys/types.h>
 #include <sys/socket.h>
 #include <netinet/in.h>
 #include <time.h>
 #ifdef HAVE_THREADS
 #include <pthread.h>
-#include <sys/syscall.h>
+#ifdef WIN32
+#define pthread_self_tid() pthread_self().p
+#else
+#define pthread_self_tid() pthread_self()
+#endif
 #define THREAD_MUTEX_INIT(var) { \
     pthread_mutexattr_t mutex_attr; \
     pthread_mutexattr_init(&mutex_attr);\
@@ -136,11 +140,15 @@ extern int statistics_enabled;
 extern int running_threads;
 extern pthread_mutex_t cache_sync;
 extern pthread_mutex_t whohandler_sync, whohandler_mass_sync;
+
+int getCurrentThreadID();
 #endif
 
 int stricmp (const char *s1, const char *s2);
 int stricmplen (const char *s1, const char *s2, int len);
 
+void restart_process();
+void cleanup();
 void restart_bot(int do_hard_restart);
 void stop_bot();
 void reload_config();