summaryrefslogtreecommitdiffstats
path: root/src/vars.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/vars.c')
-rw-r--r--src/vars.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/vars.c b/src/vars.c
index c2ec106..d3bc676 100644
--- a/src/vars.c
+++ b/src/vars.c
@@ -103,6 +103,15 @@ struct nbar nbar;
struct dmon_conf dmon;
/*
+ * Thread id variables for threads that never exit.
+ *
+ * Each variable either carries the identifier of the corresponding thread. If
+ * one of the threads is not running, the corresponding variable is assigned
+ * the identifier of the main thread instead.
+ */
+pthread_t notify_t_main, io_t_psave, ui_calendar_t_date;
+
+/*
* Variables init
*/
void vars_init(void)
@@ -166,4 +175,7 @@ void vars_init(void)
/* Start at the current date */
ui_calendar_init_slctd_day();
+
+ /* Threads not yet running. */
+ notify_t_main = io_t_psave = ui_calendar_t_date = pthread_self();
}