#ifndef TASK_H
#define TASK_H
+#include "GetTime.h"
+
/*
Definition of a Task
--------------------
build Tasks Capabilities
---------------------------------
normal 1 1
- -threaded N 1
- -smp N N
+ -threaded N N
The non-threaded build has a single Task and a single global
Capability.
- The 'threaded' build has multiple Tasks, but a single Capability.
- At any one time only one task executing STG code, other tasks are
- either busy executing code outside the RTS (e.g., a C call) or
- waiting for their turn to (again) evaluate some STG code. A task
- relinquishes its RTS token when it is asked to evaluate an external
+ The THREADED_RTS build allows multiple tasks and mulitple Capabilities.
+ Multiple Tasks may all be running Haskell code simultaneously. A task
+ relinquishes its Capability when it is asked to evaluate an external
(C) call.
-
- The SMP build allows multiple tasks and mulitple Capabilities.
- Multiple Tasks may all be running Haskell code simultaneously.
In general, there may be multiple Tasks for an OS thread. This
happens if one Task makes a foreign call from Haskell, and
// really want separate stats for each call in a nested chain of
// foreign->haskell->foreign->haskell calls, but we'll get a
// separate Task for each of the haskell calls.
- long elapsedtimestart;
- long muttimestart;
- long mut_time;
- long mut_etime;
- long gc_time;
- long gc_etime;
+ Ticks elapsedtimestart;
+ Ticks muttimestart;
+ Ticks mut_time;
+ Ticks mut_etime;
+ Ticks gc_time;
+ Ticks gc_etime;
// Links tasks onto various lists. (ToDo: do we need double
// linking now?)