-/* Health state counters for the application registration thread */
-extern struct health_state health_thread_app_reg;
+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 */
+ int type; /* Indicates the nature of the thread. */
+ /* Node of the global TLS state list. */
+ struct cds_list_head node;
+};