[PATCH v7 11/15] Log mieq enqueue overflow in a signal safe manner

Peter Hutterer peter.hutterer at who-t.net
Wed Jun 20 22:56:42 PDT 2012


From: Chase Douglas <chase.douglas at canonical.com>

Signed-off-by: Chase Douglas <chase.douglas at canonical.com>
Reviewed-by: Peter Hutterer <peter.hutterer at who-t.net>
---
 mi/mieq.c |   19 +++++++++----------
 1 file changed, 9 insertions(+), 10 deletions(-)

diff --git a/mi/mieq.c b/mi/mieq.c
index e117a8d..b2c7769 100644
--- a/mi/mieq.c
+++ b/mi/mieq.c
@@ -276,23 +276,22 @@ mieqEnqueue(DeviceIntPtr pDev, InternalEvent *e)
          */
         miEventQueue.dropped++;
         if (miEventQueue.dropped == 1) {
-            ErrorF
-                ("[mi] EQ overflowing.  Additional events will be discarded until existing events are processed.\n");
+            ErrorFSigSafe("[mi] EQ overflowing.  Additional events will be "
+                         "discarded until existing events are processed.\n");
             xorg_backtrace();
-            ErrorF
-                ("[mi] These backtraces from mieqEnqueue may point to a culprit higher up the stack.\n");
-            ErrorF("[mi] mieq is *NOT* the cause.  It is a victim.\n");
+            ErrorFSigSafe("[mi] These backtraces from mieqEnqueue may point to "
+                         "a culprit higher up the stack.\n");
+            ErrorFSigSafe("[mi] mieq is *NOT* the cause.  It is a victim.\n");
         }
         else if (miEventQueue.dropped % QUEUE_DROP_BACKTRACE_FREQUENCY == 0 &&
                  miEventQueue.dropped / QUEUE_DROP_BACKTRACE_FREQUENCY <=
                  QUEUE_DROP_BACKTRACE_MAX) {
-            ErrorF
-                ("[mi] EQ overflow continuing.  %lu events have been dropped.\n",
-                 miEventQueue.dropped);
+            ErrorFSigSafe("[mi] EQ overflow continuing.  %u events have been "
+                         "dropped.\n", miEventQueue.dropped);
             if (miEventQueue.dropped / QUEUE_DROP_BACKTRACE_FREQUENCY ==
                 QUEUE_DROP_BACKTRACE_MAX) {
-                ErrorF
-                    ("[mi] No further overflow reports will be reported until the clog is cleared.\n");
+                ErrorFSigSafe("[mi] No further overflow reports will be "
+                             "reported until the clog is cleared.\n");
             }
             xorg_backtrace();
         }
-- 
1.7.10.2



More information about the xorg-devel mailing list