summaryrefslogtreecommitdiff
path: root/rts/Task.c
diff options
context:
space:
mode:
authorBen Gamari <bgamari.foss@gmail.com>2016-11-29 16:51:30 -0500
committerBen Gamari <ben@smart-cactus.org>2016-11-29 16:51:30 -0500
commit428e152be6bb0fd3867e41cee82a6d5968a11a26 (patch)
treee43d217c10c052704f872cd7e1df4d335c12d376 /rts/Task.c
parent56d74515396c8b6360ba7898cbc4b68f0f1fb2ea (diff)
downloadhaskell-428e152be6bb0fd3867e41cee82a6d5968a11a26.tar.gz
Use C99's bool
Test Plan: Validate on lots of platforms Reviewers: erikd, simonmar, austin Reviewed By: erikd, simonmar Subscribers: michalt, thomie Differential Revision: https://phabricator.haskell.org/D2699
Diffstat (limited to 'rts/Task.c')
-rw-r--r--rts/Task.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/rts/Task.c b/rts/Task.c
index 8ce4eccdb1..b8df4d2215 100644
--- a/rts/Task.c
+++ b/rts/Task.c
@@ -36,7 +36,7 @@ uint32_t peakWorkerCount;
static int tasksInitialized = 0;
static void freeTask (Task *task);
-static Task * newTask (rtsBool);
+static Task * newTask (bool);
#if defined(THREADED_RTS)
Mutex all_tasks_mutex;
@@ -124,7 +124,7 @@ Task* getTask (void)
if (task != NULL) {
return task;
} else {
- task = newTask(rtsFalse);
+ task = newTask(false);
#if defined(THREADED_RTS)
task->id = osThreadId();
#endif
@@ -198,7 +198,7 @@ freeTask (Task *task)
}
static Task*
-newTask (rtsBool worker)
+newTask (bool worker)
{
Task *task;
@@ -207,8 +207,8 @@ newTask (rtsBool worker)
task->cap = NULL;
task->worker = worker;
- task->stopped = rtsTrue;
- task->running_finalizers = rtsFalse;
+ task->stopped = true;
+ task->running_finalizers = false;
task->n_spare_incalls = 0;
task->spare_incalls = NULL;
task->incall = NULL;
@@ -217,7 +217,7 @@ newTask (rtsBool worker)
#if defined(THREADED_RTS)
initCondition(&task->cond);
initMutex(&task->lock);
- task->wakeup = rtsFalse;
+ task->wakeup = false;
task->node = 0;
#endif
@@ -304,7 +304,7 @@ newBoundTask (void)
task = getTask();
- task->stopped = rtsFalse;
+ task->stopped = false;
newInCall(task);
@@ -327,7 +327,7 @@ boundTaskExiting (Task *task)
// call and then a callback, so it can transform into a bound
// Task for the duration of the callback.
if (task->incall == NULL) {
- task->stopped = rtsTrue;
+ task->stopped = true;
}
debugTrace(DEBUG_sched, "task exiting");
@@ -449,8 +449,8 @@ startWorkerTask (Capability *cap)
Task *task;
// A worker always gets a fresh Task structure.
- task = newTask(rtsTrue);
- task->stopped = rtsFalse;
+ task = newTask(true);
+ task->stopped = false;
// The lock here is to synchronise with taskStart(), to make sure
// that we have finished setting up the Task structure before the