diff options
Diffstat (limited to 'rts/posix/OSThreads.c')
-rw-r--r-- | rts/posix/OSThreads.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/rts/posix/OSThreads.c b/rts/posix/OSThreads.c index 343536e063..283155345c 100644 --- a/rts/posix/OSThreads.c +++ b/rts/posix/OSThreads.c @@ -57,6 +57,10 @@ #include <mach/mach.h> #endif +#ifdef HAVE_SIGNAL_H +# include <signal.h> +#endif + /* * This (allegedly) OS threads independent layer was initially * abstracted away from code that used Pthreads, so the functions @@ -290,6 +294,12 @@ setThreadAffinity (nat n GNUC3_ATTRIBUTE(__unused__), } #endif +void +interruptOSThread (OSThreadId id) +{ + pthread_kill(id, SIGPIPE); +} + #else /* !defined(THREADED_RTS) */ int |