-/*
- * Update current counter by 1 to indicate that the thread is in a blocking
- * state cause by a poll().
- */
-static inline void health_poll_update(struct health_state *state)
-{
- assert(state);
+struct health_state {
+ /*
+ * last counter and last_time are only read and updated by the health_check
+ * thread (single updater).
+ */
+ unsigned long last;
+ struct timespec last_time;
+
+ /*
+ * current and flags are updated by multiple threads concurrently.
+ */
+ unsigned long current; /* progress counter, updated atomically */
+ enum health_flags flags; /* other flags, updated atomically */
+ enum health_type type; /* Indicates the nature of the thread. */
+ /* Node of the global TLS state list. */
+ struct cds_list_head node;
+};