Duncan Coutts pushed to branch wip/dcoutts/signals-cleanup at Glasgow Haskell Compiler / GHC
Commits:
-
1e290feb
by Duncan Coutts at 2026-11-12T15:27:15+00:00
6 changed files:
- rts/posix/MIO.h
- rts/posix/Poll.c
- rts/posix/Poll.h
- rts/posix/Select.h
- rts/posix/SelectBis.h
- rts/posix/UserSignals.c
Changes:
| ... | ... | @@ -10,8 +10,8 @@ |
| 10 | 10 | |
| 11 | 11 | #include "IOManager.h"
|
| 12 | 12 | |
| 13 | -#if defined(HAVE_SIGNAL_H)
|
|
| 14 | -# include <signal.h>
|
|
| 13 | +#if defined(RTS_USER_SIGNALS)
|
|
| 14 | +#include <signal.h>
|
|
| 15 | 15 | #endif
|
| 16 | 16 | |
| 17 | 17 | #include "BeginPrivate.h"
|
| ... | ... | @@ -26,8 +26,11 @@ void ioManagerStart (void); |
| 26 | 26 | void ioManagerStartCap (/* inout */ Capability **cap);
|
| 27 | 27 | |
| 28 | 28 | void interruptIOManagerFromSignalMIO(void);
|
| 29 | + |
|
| 30 | +#if defined(RTS_USER_SIGNALS)
|
|
| 29 | 31 | int installUserSignalHandlerMIO(int sig, int spi, sigset_t *mask,
|
| 30 | 32 | bool nocldstop);
|
| 31 | 33 | #endif
|
| 34 | +#endif
|
|
| 32 | 35 | |
| 33 | 36 | #include "EndPrivate.h" |
| ... | ... | @@ -34,7 +34,6 @@ |
| 34 | 34 | */
|
| 35 | 35 | #define _GNU_SOURCE 1
|
| 36 | 36 | #define __BSD_VISIBLE 1
|
| 37 | -#include <signal.h>
|
|
| 38 | 37 | #include <poll.h>
|
| 39 | 38 | #endif
|
| 40 | 39 |
| ... | ... | @@ -12,6 +12,10 @@ |
| 12 | 12 | |
| 13 | 13 | #include "IOManager.h"
|
| 14 | 14 | |
| 15 | +#if defined(RTS_USER_SIGNALS)
|
|
| 16 | +#include <signal.h>
|
|
| 17 | +#endif
|
|
| 18 | + |
|
| 15 | 19 | #include "BeginPrivate.h"
|
| 16 | 20 | |
| 17 | 21 | #if defined(IOMGR_ENABLED_POLL)
|
| ... | ... | @@ -8,6 +8,10 @@ |
| 8 | 8 | |
| 9 | 9 | #pragma once
|
| 10 | 10 | |
| 11 | +#if defined(RTS_USER_SIGNALS)
|
|
| 12 | +#include <signal.h>
|
|
| 13 | +#endif
|
|
| 14 | + |
|
| 11 | 15 | #include "BeginPrivate.h"
|
| 12 | 16 | |
| 13 | 17 | // An absolute time value in units of 10ms.
|
| ... | ... | @@ -32,6 +32,10 @@ |
| 32 | 32 | |
| 33 | 33 | #include "IOManager.h"
|
| 34 | 34 | |
| 35 | +#if defined(RTS_USER_SIGNALS)
|
|
| 36 | +#include <signal.h>
|
|
| 37 | +#endif
|
|
| 38 | + |
|
| 35 | 39 | #include "BeginPrivate.h"
|
| 36 | 40 | |
| 37 | 41 | #if defined(IOMGR_ENABLED_SELECTBIS)
|
| ... | ... | @@ -26,7 +26,6 @@ |
| 26 | 26 | #endif
|
| 27 | 27 | |
| 28 | 28 | #include <unistd.h>
|
| 29 | -#include <signal.h>
|
|
| 30 | 29 | #include <fcntl.h>
|
| 31 | 30 | #include <string.h>
|
| 32 | 31 |