diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2014-01-27 21:20:40 +0000 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2014-01-27 21:48:17 +0000 |
commit | ad7daf9aae487af13c0578de95652675d4d2ed7d (patch) | |
tree | 546d2550bd51f601aebfbe30935e68166ed755d8 | |
parent | 294180b3bf78f2c0ae2f1197e1c0819d99009356 (diff) |
sna: Use signal-safe DBG
Otherwise we end up confusing the core Xserver functions when called
from auxilliary threads.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
-rw-r--r-- | src/sna/sna_driver.c | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/src/sna/sna_driver.c b/src/sna/sna_driver.c index 4472f255..fd0d3bd2 100644 --- a/src/sna/sna_driver.c +++ b/src/sna/sna_driver.c @@ -1256,8 +1256,18 @@ _X_ATTRIBUTE_PRINTF(1, 0) void LogF(const char *f, ...) { va_list ap; + /* As we not only may be called from any context, we may also + * be called from a thread whilst the main thread is handling + * signals, therefore we have to use the signal-safe variants + * or else we trip over false positive assertions. + */ + va_start(ap, f); - LogVWrite(1, f, ap); +#if XORG_VERSION_CURRENT >= XORG_VERSION_NUMERIC(1,12,99,901,0) + LogVMessageVerbSigSafe(X_NONE, 1, f, ap); +#else + LogVMessageVerb(X_NONE, 1, f, ap); +#endif va_end(ap); } #endif |