projects
/
awesomized
/
libmemcached
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
|
github
raw
|
inline
| side by side
Update with job builder.
[awesomized/libmemcached]
/
util
/
signal.hpp
diff --git
a/util/signal.hpp
b/util/signal.hpp
index e082d7d23613a39c141e6efd8cba463aada0dbda..fab67be63ce8f84c1cd7165ede04172987e71f49 100644
(file)
--- a/
util/signal.hpp
+++ b/
util/signal.hpp
@@
-43,6
+43,16
@@
#include <signal.h>
#endif
#include <signal.h>
#endif
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+typedef void (signal_callback_fn)();
+
+#ifdef __cplusplus
+}
+#endif
+
namespace datadifferential {
namespace util {
namespace datadifferential {
namespace util {
@@
-59,7
+69,6
@@
class SignalThread {
uint64_t magic_memory;
volatile shutdown_t __shutdown;
pthread_mutex_t shutdown_mutex;
uint64_t magic_memory;
volatile shutdown_t __shutdown;
pthread_mutex_t shutdown_mutex;
- pthread_t thread;
public:
public:
@@
-84,6
+93,13
@@
public:
void set_shutdown(shutdown_t arg);
bool is_shutdown();
shutdown_t get_shutdown();
void set_shutdown(shutdown_t arg);
bool is_shutdown();
shutdown_t get_shutdown();
+
+ void sighup();
+ void sighup(signal_callback_fn* arg);
+
+private:
+ pthread_t thread;
+ signal_callback_fn* _sighup;
};
} /* namespace util */
};
} /* namespace util */