X-Git-Url: http://git.megacz.com/?p=ghc-hetmet.git;a=blobdiff_plain;f=rts%2FTask.h;h=424af607eab8298dd4db63289b2213772f046045;hp=17a443ad6bcb53d597ee19501d502814e78d5241;hb=cf5905ea24904cf73a041fd7535e8723a668cb9a;hpb=2007d2138cf17efe6a1701510dbafdfc30e8926c diff --git a/rts/Task.h b/rts/Task.h index 17a443a..424af60 100644 --- a/rts/Task.h +++ b/rts/Task.h @@ -4,6 +4,9 @@ * * Tasks * + * For details on the high-level design, see + * http://hackage.haskell.org/trac/ghc/wiki/Commentary/Rts/Scheduler + * * -------------------------------------------------------------------------*/ #ifndef TASK_H @@ -11,7 +14,7 @@ #include "GetTime.h" -BEGIN_RTS_PRIVATE +#include "BeginPrivate.h" /* Definition of a Task @@ -204,6 +207,9 @@ void workerTaskStop (Task *task); // void taskTimeStamp (Task *task); +// The current Task has finished a GC, record the amount of time spent. +void taskDoneGC (Task *task, Ticks cpu_time, Ticks elapsed_time); + // Put the task back on the free list, mark it stopped. Used by // forkProcess(). // @@ -222,6 +228,11 @@ INLINE_HEADER Task *myTask (void); // void startWorkerTask (Capability *cap); +// Interrupts a worker task that is performing an FFI call. The thread +// should not be destroyed. +// +void interruptWorkerTask (Task *task); + #endif /* THREADED_RTS */ // ----------------------------------------------------------------------------- @@ -230,8 +241,9 @@ void startWorkerTask (Capability *cap); // A thread-local-storage key that we can use to get access to the // current thread's Task structure. #if defined(THREADED_RTS) -#if defined(linux_HOST_OS) && \ - (defined(i386_HOST_ARCH) || defined(x86_64_HOST_ARCH)) +#if (defined(linux_HOST_OS) && \ + (defined(i386_HOST_ARCH) || defined(x86_64_HOST_ARCH))) || \ + (defined(mingw32_HOST_OS) && __GNUC__ >= 4 && __GNUC_MINOR__ >= 4) #define MYTASK_USE_TLV extern __thread Task *my_task; #else @@ -267,6 +279,6 @@ setMyTask (Task *task) #endif } -END_RTS_PRIVATE +#include "EndPrivate.h" #endif /* TASK_H */