X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=rts%2Fposix%2FOSThreads.c;h=29cb23eb6d700dc5e3494550004194f8ededad07;hb=209e093599d0d4db5487d124895d817c55b7c052;hp=343536e0632436448e982e5dee304d2055e9bfb6;hpb=13346da217137e4efb6cf14657960c75a23251ad;p=ghc-hetmet.git diff --git a/rts/posix/OSThreads.c b/rts/posix/OSThreads.c index 343536e..29cb23e 100644 --- a/rts/posix/OSThreads.c +++ b/rts/posix/OSThreads.c @@ -7,7 +7,7 @@ * * --------------------------------------------------------------------------*/ -#if defined(__linux__) +#if defined(__linux__) || defined(__GLIBC__) /* We want GNU extensions in DEBUG mode for mutex error checking */ /* We also want the affinity API, which requires _GNU_SOURCE */ #define _GNU_SOURCE @@ -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