mirror of
https://github.com/SWG-Source/src.git
synced 2026-07-14 23:07:48 -04:00
cleanups
This commit is contained in:
@@ -12,10 +12,30 @@
|
||||
#include "sharedRandom/SetupSharedRandom.h"
|
||||
#include "sharedThread/SetupSharedThread.h"
|
||||
|
||||
#ifdef ENABLE_PROFILING
|
||||
extern "C" int __llvm_profile_write_file(void);
|
||||
#endif
|
||||
|
||||
inline void signalHandler(int s){
|
||||
printf("PlanetServer terminating, signal %d\n",s);
|
||||
|
||||
#ifdef ENABLE_PROFILING
|
||||
__llvm_profile_write_file();
|
||||
#endif
|
||||
|
||||
exit(0);
|
||||
}
|
||||
|
||||
// ======================================================================
|
||||
|
||||
int main(int argc, char ** argv)
|
||||
{
|
||||
struct sigaction sigIntHandler;
|
||||
sigIntHandler.sa_handler = signalHandler;
|
||||
sigemptyset(&sigIntHandler.sa_mask);
|
||||
sigIntHandler.sa_flags = 0;
|
||||
sigaction(SIGINT, &sigIntHandler, NULL);
|
||||
|
||||
SetupSharedThread::install();
|
||||
SetupSharedDebug::install(1024);
|
||||
|
||||
@@ -52,6 +72,7 @@ int main(int argc, char ** argv)
|
||||
SetupSharedFoundation::remove();
|
||||
|
||||
#ifdef ENABLE_PROFILING
|
||||
__llvm_profile_write_file();
|
||||
exit(0);
|
||||
#endif
|
||||
|
||||
|
||||
@@ -12,10 +12,31 @@
|
||||
#include "sharedRandom/SetupSharedRandom.h"
|
||||
#include "sharedThread/SetupSharedThread.h"
|
||||
|
||||
#ifdef ENABLE_PROFILING
|
||||
extern "C" int __llvm_profile_write_file(void);
|
||||
#endif
|
||||
|
||||
inline void signalHandler(int s){
|
||||
printf("PlanetServer terminating, signal %d\n",s);
|
||||
|
||||
#ifdef ENABLE_PROFILING
|
||||
__llvm_profile_write_file();
|
||||
#endif
|
||||
|
||||
exit(0);
|
||||
}
|
||||
|
||||
// ======================================================================
|
||||
|
||||
int main(int argc, char ** argv)
|
||||
{
|
||||
struct sigaction sigIntHandler;
|
||||
sigIntHandler.sa_handler = signalHandler;
|
||||
sigemptyset(&sigIntHandler.sa_mask);
|
||||
sigIntHandler.sa_flags = 0;
|
||||
sigaction(SIGINT, &sigIntHandler, NULL);
|
||||
|
||||
|
||||
SetupSharedThread::install();
|
||||
SetupSharedDebug::install(1024);
|
||||
|
||||
@@ -40,6 +61,7 @@ int main(int argc, char ** argv)
|
||||
SetupSharedFoundation::remove();
|
||||
|
||||
#ifdef ENABLE_PROFILING
|
||||
__llvm_profile_write_file();
|
||||
exit(0);
|
||||
#endif
|
||||
|
||||
|
||||
@@ -96,9 +96,9 @@ int main(int argc, char ** argv)
|
||||
SetupSharedThread::remove();
|
||||
|
||||
#ifdef ENABLE_PROFILING
|
||||
__llvm_profile_write_file();
|
||||
__llvm_profile_write_file();
|
||||
exit(0);
|
||||
#endif
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
@@ -71,9 +71,9 @@ int main(int argc, char **argv)
|
||||
SetupSharedThread::remove();
|
||||
|
||||
#ifdef ENABLE_PROFILING
|
||||
__llvm_profile_write_file();
|
||||
__llvm_profile_write_file();
|
||||
exit(0);
|
||||
#endif
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
@@ -66,8 +66,8 @@ int main(int argc, char **argv) {
|
||||
SetupSharedFoundation::remove();
|
||||
|
||||
#ifdef ENABLE_PROFILING
|
||||
__llvm_profile_write_file();
|
||||
__llvm_profile_write_file();
|
||||
exit(0);
|
||||
#endif
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -89,8 +89,8 @@ int main(int argc, char ** argv)
|
||||
SetupSharedThread::remove();
|
||||
|
||||
#ifdef ENABLE_PROFILING
|
||||
__llvm_profile_write_file();
|
||||
__llvm_profile_write_file();
|
||||
exit(0);
|
||||
#endif
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -64,7 +64,8 @@ int main(int argc, char ** argv)
|
||||
SetupSharedFoundation::remove();
|
||||
|
||||
#ifdef ENABLE_PROFILING
|
||||
__llvm_profile_write_file();
|
||||
__llvm_profile_write_file();
|
||||
exit(0);
|
||||
#endif
|
||||
|
||||
return 0;
|
||||
|
||||
@@ -95,7 +95,8 @@ int main(int argc, char ** argv)
|
||||
SetupSharedThread::remove();
|
||||
|
||||
#ifdef ENABLE_PROFILING
|
||||
__llvm_profile_write_file();
|
||||
__llvm_profile_write_file();
|
||||
exit(0);
|
||||
#endif
|
||||
|
||||
return 0;
|
||||
|
||||
@@ -159,9 +159,9 @@ int main(int argc, char ** argv)
|
||||
SetupSharedThread::remove ();
|
||||
|
||||
#ifdef ENABLE_PROFILING
|
||||
__llvm_profile_write_file();
|
||||
__llvm_profile_write_file();
|
||||
exit(0);
|
||||
#endif
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user