memcat: fix #59 (typo) [ci skip]
[awesomized/libmemcached] / libtest / signal.h
index d87d4f4e82abb3ec45155e618db789f68f6b4197..6e68bb3878b0a289aafbe48fb0487b92ed4d04c4 100644 (file)
@@ -1,8 +1,8 @@
 /*  vim:expandtab:shiftwidth=2:tabstop=2:smarttab:
- * 
- *  uTest, libtest
  *
- *  Copyright (C) 2011 Data Differential, http://datadifferential.com/
+ *  Data Differential YATL (i.e. libtest)  library
+ *
+ *  Copyright (C) 2012 Data Differential, http://datadifferential.com/
  *
  *  Redistribution and use in source and binary forms, with or without
  *  modification, are permitted provided that the following conditions are
  *
  */
 
-
 #pragma once 
 
 #include <pthread.h>
 #include <semaphore.h>
+#include <signal.h>
 
 enum shutdown_t {
   SHUTDOWN_RUNNING,
@@ -55,22 +55,23 @@ class SignalThread {
   volatile shutdown_t __shutdown;
   pthread_mutex_t shutdown_mutex;
   pthread_t thread;
+  sigset_t original_set;
 
 public:
 
   SignalThread();
+  ~SignalThread();
 
   void test();
   void post();
   bool setup();
+  bool unblock();
 
   int wait(int& sig)
   {
     return sigwait(&set, &sig);
   }
 
-  ~SignalThread();
-
   void set_shutdown(shutdown_t arg);
   bool is_shutdown();
   shutdown_t get_shutdown();