(!1691) xwin: drop duplicate OsVendorVErrorF()
It really doesn't seem to be necessary to protect a LogVMessageVerb() call by extra mutex on windows only, while obviously not needed on any other platform. Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
This commit is contained in:
parent
d49410d599
commit
76ad971c52
|
@ -529,9 +529,6 @@ OsVendorInit(void)
|
|||
|
||||
winFixupPaths();
|
||||
|
||||
if (!OsVendorVErrorFProc)
|
||||
OsVendorVErrorFProc = OsVendorVErrorF;
|
||||
|
||||
if (!g_fLogInited) {
|
||||
/* keep this order. If LogInit fails it calls Abort which then calls
|
||||
* ddxGiveUp where LogInit is called again and creates an infinite
|
||||
|
|
|
@ -739,10 +739,6 @@ void
|
|||
* winerror.c
|
||||
*/
|
||||
|
||||
void
|
||||
OsVendorVErrorF(const char *pszFormat, va_list va_args)
|
||||
_X_ATTRIBUTE_PRINTF(1, 0);
|
||||
|
||||
void
|
||||
winMessageBoxF(const char *pszError, UINT uType, ...)
|
||||
_X_ATTRIBUTE_PRINTF(1, 3);
|
||||
|
|
|
@ -40,23 +40,6 @@
|
|||
|
||||
#include "dix/input_priv.h"
|
||||
|
||||
void
|
||||
OsVendorVErrorF(const char *pszFormat, va_list va_args)
|
||||
{
|
||||
/* make sure the clipboard and multiwindow threads do not interfere the
|
||||
* main thread */
|
||||
static pthread_mutex_t s_pmPrinting = PTHREAD_MUTEX_INITIALIZER;
|
||||
|
||||
/* Lock the printing mutex */
|
||||
pthread_mutex_lock(&s_pmPrinting);
|
||||
|
||||
/* Print the error message to a log file, could be stderr */
|
||||
LogVMessageVerb(X_NONE, 0, pszFormat, va_args);
|
||||
|
||||
/* Unlock the printing mutex */
|
||||
pthread_mutex_unlock(&s_pmPrinting);
|
||||
}
|
||||
|
||||
/*
|
||||
* os/log.c:FatalError () calls our vendor ErrorF, so the message
|
||||
* from a FatalError will be logged.
|
||||
|
|
|
@ -226,12 +226,6 @@ ddxProcessArgument(int argc, char *argv[], int i)
|
|||
|
||||
/* Initialize once */
|
||||
if (!s_fBeenHere) {
|
||||
/*
|
||||
* This initialises our hook into VErrorF () for catching log messages
|
||||
* that are generated before OsInit () is called.
|
||||
*/
|
||||
OsVendorVErrorFProc = OsVendorVErrorF;
|
||||
|
||||
s_fBeenHere = TRUE;
|
||||
|
||||
/* Initialize only if option is not -help */
|
||||
|
|
7
os/log.c
7
os/log.c
|
@ -110,8 +110,6 @@ OR PERFORMANCE OF THIS SOFTWARE.
|
|||
#pragma clang diagnostic ignored "-Wformat-nonliteral"
|
||||
#endif
|
||||
|
||||
void (*OsVendorVErrorFProc) (const char *, va_list args) = NULL;
|
||||
|
||||
/* Default logging parameters. */
|
||||
#define DEFAULT_LOG_VERBOSITY 0
|
||||
#define DEFAULT_LOG_FILE_VERBOSITY 3
|
||||
|
@ -899,10 +897,7 @@ FatalError(const char *f, ...)
|
|||
void
|
||||
VErrorF(const char *f, va_list args)
|
||||
{
|
||||
if (OsVendorVErrorFProc)
|
||||
OsVendorVErrorFProc(f, args);
|
||||
else
|
||||
LogVMessageVerb(X_NONE, -1, f, args);
|
||||
LogVMessageVerb(X_NONE, -1, f, args);
|
||||
}
|
||||
|
||||
void
|
||||
|
|
|
@ -172,10 +172,6 @@ int os_move_fd(int fd);
|
|||
depending on whether multithreading is used */
|
||||
int xthread_sigmask(int how, const sigset_t *set, sigset_t *oldest);
|
||||
|
||||
/* callback for DDX specific error printing, if any (may be NULL) */
|
||||
extern void (*OsVendorVErrorFProc) (const char *, va_list args)
|
||||
_X_ATTRIBUTE_PRINTF(1, 0);
|
||||
|
||||
typedef void (*OsSigHandlerPtr) (int sig);
|
||||
|
||||
/* install signal handler */
|
||||
|
|
Loading…
Reference in New Issue