summaryrefslogtreecommitdiff
path: root/rts/Task.h
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.h
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.h')
-rw-r--r--rts/Task.h12
1 files changed, 6 insertions, 6 deletions
diff --git a/rts/Task.h b/rts/Task.h
index 93234591ba..e5c21931a1 100644
--- a/rts/Task.h
+++ b/rts/Task.h
@@ -128,7 +128,7 @@ typedef struct Task_ {
// or just continue immediately. It's a workaround for the fact
// that signalling a condition variable doesn't do anything if the
// thread is already running, but we want it to be sticky.
- rtsBool wakeup;
+ bool wakeup;
#endif
// If the task owns a Capability, task->cap points to it. (occasionally a
@@ -149,12 +149,12 @@ typedef struct Task_ {
uint32_t n_spare_incalls;
struct InCall_ *spare_incalls;
- rtsBool worker; // == rtsTrue if this is a worker Task
- rtsBool stopped; // == rtsTrue between newBoundTask and
+ bool worker; // == true if this is a worker Task
+ bool stopped; // == true between newBoundTask and
// boundTaskExiting, or in a worker Task.
// So that we can detect when a finalizer illegally calls back into Haskell
- rtsBool running_finalizers;
+ bool running_finalizers;
// if >= 0, this Capability will be used for in-calls
int preferred_capability;
@@ -169,7 +169,7 @@ typedef struct Task_ {
} Task;
-INLINE_HEADER rtsBool
+INLINE_HEADER bool
isBoundTask (Task *task)
{
return (task->incall->tso != NULL);
@@ -180,7 +180,7 @@ isBoundTask (Task *task)
// (b) it has not left and re-entered Haskell, in which case
// task->incall->prev_stack would be non-NULL.
//
-INLINE_HEADER rtsBool
+INLINE_HEADER bool
isWorker (Task *task)
{
return (task->worker && task->incall->prev_stack == NULL);