X-Git-Url: http://git.megacz.com/?p=ghc-hetmet.git;a=blobdiff_plain;f=rts%2Fposix%2FOSThreads.c;h=283155345ca0280114c69f10081da6f5ed39be64;hp=343536e0632436448e982e5dee304d2055e9bfb6;hb=83d563cb9ede0ba792836e529b1e2929db926355;hpb=9fa96fc44a640014415e1588f50ab7689285e6cb;ds=sidebyside diff --git a/rts/posix/OSThreads.c b/rts/posix/OSThreads.c index 343536e..2831553 100644 --- a/rts/posix/OSThreads.c +++ b/rts/posix/OSThreads.c @@ -57,6 +57,10 @@ #include #endif +#ifdef HAVE_SIGNAL_H +# include +#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