00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022 #include <ModuleData.h>
00023 #include <pthread.h>
00024 #include <signal.h>
00025 #include <string>
00026
00027 #define BLOCK_SIGNALS() { sigset_t set; sigfillset(&set); pthread_sigmask(SIG_SETMASK, &set, NULL); }
00028 #define BLOCK_SIGNAL(s) { sigset_t set; sigemptyset(&set); sigaddset(&set, (s)); pthread_sigmask(SIG_SETMASK, &set, NULL); }
00029 #define BLOCK_SIGNALS_EXCEPT(s) { sigset_t set; sigfillset(&set); sigdelset(&set, (s)); pthread_sigmask(SIG_SETMASK, &set, NULL); }
00030
00031 void* module_executor(void *ptr);
00032
00033 struct executorArg {
00034 executorArg(std::string name, perThreadStruct* data) : mod_name(name), threadData(data) {}
00035
00036 std::string mod_name;
00037 perThreadStruct* threadData;
00038 };