emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] /srv/bzr/emacs/trunk r110234: * profiler.c (sigprof_handle


From: Tomohiro Matsuyama
Subject: [Emacs-diffs] /srv/bzr/emacs/trunk r110234: * profiler.c (sigprof_handler): Fix race condition.
Date: Fri, 28 Sep 2012 18:34:20 +0900
User-agent: Bazaar (2.5.0)

------------------------------------------------------------
revno: 110234
committer: Tomohiro Matsuyama <address@hidden>
branch nick: trunk
timestamp: Fri 2012-09-28 18:34:20 +0900
message:
  * profiler.c (sigprof_handler): Fix race condition.
modified:
  src/ChangeLog
  src/profiler.c
=== modified file 'src/ChangeLog'
--- a/src/ChangeLog     2012-09-28 07:40:42 +0000
+++ b/src/ChangeLog     2012-09-28 09:34:20 +0000
@@ -1,3 +1,7 @@
+2012-09-28  Tomohiro Matsuyama  <address@hidden>
+
+       * profiler.c (sigprof_handler): Fix race condition.
+
 2012-09-28  Glenn Morris  <address@hidden>
 
        * lread.c (lisp_file_lexically_bound_p): Handle #! lines.  (Bug#12528)

=== modified file 'src/profiler.c'
--- a/src/profiler.c    2012-09-26 23:14:13 +0000
+++ b/src/profiler.c    2012-09-28 09:34:20 +0000
@@ -24,6 +24,7 @@
 #include <signal.h>
 #include <setjmp.h>
 #include "lisp.h"
+#include "syssignal.h"
 
 /* Logs.  */
 
@@ -214,7 +215,7 @@
 /* Signal handler for sample profiler.  */
 
 static void
-sigprof_handler (int signal)
+sigprof_handler_1 (int signal)
 {
   eassert (HASH_TABLE_P (cpu_log));
   if (backtrace_list && EQ (*backtrace_list->function, Qautomatic_gc))
@@ -229,6 +230,12 @@
     record_backtrace (XHASH_TABLE (cpu_log), current_sample_interval);
 }
 
+static void
+sigprof_handler (int signal)
+{
+  deliver_process_signal (signal, sigprof_handler_1);
+}
+
 DEFUN ("profiler-cpu-start", Fprofiler_cpu_start, Sprofiler_cpu_start,
        1, 1, 0,
        doc: /* Start or restart the cpu profiler.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]