aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/profiler.c6
-rw-r--r--src/syssignal.h10
2 files changed, 13 insertions, 3 deletions
diff --git a/src/profiler.c b/src/profiler.c
index 185382c5bd8..d4c98a82657 100644
--- a/src/profiler.c
+++ b/src/profiler.c
@@ -217,6 +217,12 @@ static EMACS_INT current_sampling_interval;
217 217
218/* Signal handler for sampling profiler. */ 218/* Signal handler for sampling profiler. */
219 219
220/* timer_getoverrun is not implemented on Cygwin, but the following
221 seems to be good enough for profiling. */
222#ifdef CYGWIN
223#define timer_getoverrun(x) 0
224#endif
225
220static void 226static void
221handle_profiler_signal (int signal) 227handle_profiler_signal (int signal)
222{ 228{
diff --git a/src/syssignal.h b/src/syssignal.h
index 28824003c5d..5c14479ccad 100644
--- a/src/syssignal.h
+++ b/src/syssignal.h
@@ -32,13 +32,17 @@ extern void unblock_tty_out_signal (sigset_t const *);
32#define FORWARD_SIGNAL_TO_MAIN_THREAD 32#define FORWARD_SIGNAL_TO_MAIN_THREAD
33#endif 33#endif
34 34
35/* On Cygwin as of 2015-06-22 SIGEV_SIGNAL is defined as an enum
36 constant but not as a macro. */
37#if defined CYGWIN && !defined SIGEV_SIGNAL
38#define SIGEV_SIGNAL SIGEV_SIGNAL
39#endif
40
35#if defined HAVE_TIMER_SETTIME && defined SIGEV_SIGNAL 41#if defined HAVE_TIMER_SETTIME && defined SIGEV_SIGNAL
36# define HAVE_ITIMERSPEC 42# define HAVE_ITIMERSPEC
37#endif 43#endif
38 44
39/* On Cygwin, setitimer does not support ITIMER_PROF, so we can't 45#if (defined SIGPROF && !defined PROFILING \
40 support CPU profiling. */
41#if (defined SIGPROF && !defined PROFILING && !defined CYGWIN \
42 && (defined HAVE_SETITIMER || defined HAVE_ITIMERSPEC)) 46 && (defined HAVE_SETITIMER || defined HAVE_ITIMERSPEC))
43# define PROFILER_CPU_SUPPORT 47# define PROFILER_CPU_SUPPORT
44#endif 48#endif