Made Xorriso_process_msg_queues() thread-safe

This commit is contained in:
2012-09-13 13:09:54 +00:00
parent d3ca2f9c83
commit fcc00d4311
6 changed files with 220 additions and 62 deletions

View File

@ -19,6 +19,12 @@
#define Xorriso_private_includeD yes
/* <<< Disable this to disable pthread_mutex locking on message and result
output.
*/
#define Xorriso_fetch_with_msg_queueS yes
/* for uint32_t */
#ifdef HAVE_STDINT_H
#include <stdint.h>
@ -566,6 +572,9 @@ struct XorrisO { /* the global context of xorriso */
pthread_mutex_t lib_msg_queue_lock;
pthread_mutex_t result_msglists_lock;
int write_to_channel_lock_ini;
pthread_mutex_t write_to_channel_lock;
int status_history_max; /* for -status long_history */
/* 0= no logging of SCSI commands, 1= to stderr */
@ -579,6 +588,8 @@ struct XorrisO { /* the global context of xorriso */
int abort_on_is_default; /* will be set to 0 by first -abort_on */
int problem_status; /* Severity rank number. 0= no abort condition present */
char problem_status_text[20];
int problem_status_lock_ini;
pthread_mutex_t problem_status_lock;
char errfile_log[SfileadrL]; /* for -errfile_log */
int errfile_mode; /* bit0= marked */