Overview
Comment: | Ensure that pthread condition variable in logging is initialized |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | trunk |
Files: | files | file ages | folders |
SHA1: | f278a982721a446ebf1daa257c88a996679fa531 |
User & Date: | rkeene on 2020-04-01 19:03:57 |
Other Links: | manifest | tags |
Context
2020-04-02
| ||
15:49 | More inputs to AFL check-in: abedee59bf user: rkeene tags: trunk | |
2020-04-01
| ||
19:03 | Ensure that pthread condition variable in logging is initialized check-in: f278a98272 user: rkeene tags: trunk | |
18:37 | Emit links to downloads check-in: cb5ff1a1e0 user: rkeene tags: trunk | |
Changes
Modified filed.c from [28001c198c] to [e0a9bfdbe7].
198 198 /* Global variables */ 199 199 /** Open File cache **/ 200 200 struct filed_fileinfo *filed_fileinfo_fdcache = NULL; 201 201 unsigned int filed_fileinfo_fdcache_size = 0; 202 202 203 203 /** Logging **/ 204 204 struct filed_log_entry *filed_log_msg_list; 205 -pthread_mutex_t filed_log_msg_list_mutex; 206 -pthread_cond_t filed_log_msg_list_ready; 205 +pthread_mutex_t filed_log_msg_list_mutex = PTHREAD_MUTEX_INITIALIZER; 206 +pthread_cond_t filed_log_msg_list_ready = PTHREAD_COND_INITIALIZER; 207 207 208 208 /* Signal Handler */ 209 209 static void filed_signal_handler(int signal_number) { 210 210 struct filed_fileinfo *cache; 211 211 unsigned int idx; 212 212 213 213 switch (signal_number) { ................................................................................ 595 595 pthread_t thread_id; 596 596 597 597 args = malloc(sizeof(*args)); 598 598 args->fp = logfp; 599 599 600 600 filed_log_msg_list = NULL; 601 601 602 - pthread_mutex_init(&filed_log_msg_list_mutex, NULL); 603 - 604 602 pthread_create(&thread_id, NULL, filed_logging_thread, args); 605 603 606 604 filed_log_msg("START"); 607 605 608 606 return(0); 609 607 } 610 608 #endif