diff options
Diffstat (limited to 'rts/Task.h')
-rw-r--r-- | rts/Task.h | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/rts/Task.h b/rts/Task.h index cf12ca232c..9b6a8e8d7b 100644 --- a/rts/Task.h +++ b/rts/Task.h @@ -149,8 +149,8 @@ typedef struct Task_ { struct InCall_ *spare_incalls; bool worker; // == true if this is a worker Task - bool stopped; // == true between newBoundTask and - // boundTaskExiting, or in a worker Task. + bool stopped; // == false between newBoundTask and + // exitMyTask, or in a worker Task. // So that we can detect when a finalizer illegally calls back into Haskell bool running_finalizers; @@ -200,9 +200,9 @@ extern Mutex all_tasks_mutex; void initTaskManager (void); uint32_t freeTaskManager (void); -// Create a new Task for a bound thread. This Task must be released -// by calling boundTaskExiting. The Task is cached in -// thread-local storage and will remain even after boundTaskExiting() +// Create a new Task for a bound thread. This Task must be released +// by calling exitMyTask(). The Task is cached in +// thread-local storage and will remain even after exitMyTask() // has been called; to free the memory, see freeMyTask(). // Task* newBoundTask (void); @@ -210,11 +210,10 @@ Task* newBoundTask (void); // Return the current OS thread's Task, which is created if it doesn't already // exist. After you have finished using RTS APIs, you should call freeMyTask() // to release this thread's Task. -Task* getTask (void); +Task* getMyTask (void); -// The current task is a bound task that is exiting. -// -void boundTaskExiting (Task *task); +// Exit myTask - This is the counterpart of newBoundTask(). +void exitMyTask (void); // Free a Task if one was previously allocated by newBoundTask(). // This is not necessary unless the thread that called newBoundTask() |