+2012-09-28 Tomohiro Matsuyama <tomo@cx4a.org>
+
+ * profiler.c (sigprof_handler): Fix race condition.
+
2012-09-28 Glenn Morris <rgm@gnu.org>
* lread.c (lisp_file_lexically_bound_p): Handle #! lines. (Bug#12528)
#include <signal.h>
#include <setjmp.h>
#include "lisp.h"
+#include "syssignal.h"
/* Logs. */
/* 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))
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.