diff options
Diffstat (limited to 'src/mds-registry/slave.h')
-rw-r--r-- | src/mds-registry/slave.h | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/src/mds-registry/slave.h b/src/mds-registry/slave.h index cd98f80..9f08f07 100644 --- a/src/mds-registry/slave.h +++ b/src/mds-registry/slave.h @@ -24,6 +24,7 @@ #include <stdlib.h> #include <stdint.h> #include <pthread.h> +#include <time.h> @@ -32,7 +33,7 @@ /** * Slave information, a thread waiting for protocols to become available */ -typedef struct slave /* TODO: add time-to-live */ +typedef struct slave { /** * Set of protocols for which to wait that they become available @@ -69,6 +70,17 @@ typedef struct slave /* TODO: add time-to-live */ */ pthread_t thread; + /** + * The time slave should die if its condition + * has not be meet at that time + */ + struct timespec dethklok; + + /** + * Whether `dethklok` should apply + */ + int timed; + } slave_t; |