// SPDX-License-Identifier: GPL-3.0-or-later#include"health.h"unsignedintdefault_health_enabled=1;char*silencers_filename;// the queue of executed alarm notifications that haven't been waited for yetstaticstruct{ALARM_ENTRY*head;// oldestALARM_ENTRY*tail;// latest}alarm_notifications_in_progress={NULL,NULL};typedefstructactive_alerts{char*name;time_tlast_status_change;RRDCALC_STATUSstatus;}active_alerts_t;staticinlinevoidenqueue_alarm_notify_in_progress(ALARM_ENTRY*ae){ae->prev_in_progress=NULL;ae->next_in_progress=NULL;if(NULL!=alarm_notifications_in_progress.tail){ae->prev_in_progress=alarm_notifications_in_progress.tail;alarm_notifications_in_progress.tail->next_in_progress=ae;}if(NULL==alarm_notifications_in_progress.head){alarm_notifications_in_progress.head=ae;}alarm_notifications_in_progress.tail=ae;}staticinlinevoidunlink_alarm_notify_in_progress(ALARM_ENTRY*ae){structalarm_entry*prev=ae->prev_in_progress;structalarm_entry*next=ae->next_in_progress;if(NULL!=prev){prev->next_in_progress=next;}if(NULL!=next){next->prev_in_progress=prev;}if(ae==alarm_notifications_in_progress.head){alarm_notifications_in_progress.head=next;}if(ae==