summaryrefslogtreecommitdiff
path: root/rts/Task.c
diff options
context:
space:
mode:
authorBen Gamari <ben@smart-cactus.org>2017-04-21 09:16:48 -0400
committerBen Gamari <ben@smart-cactus.org>2017-04-28 22:35:04 -0400
commit945c45ad50ed31e3acb96fdaafb21640c4669f12 (patch)
treeae2e59ba8d3a49bbd3c3dcece39d53aef691ed44 /rts/Task.c
parente5b3492f23c2296d0d8221e1787ee585331f726e (diff)
downloadhaskell-945c45ad50ed31e3acb96fdaafb21640c4669f12.tar.gz
Prefer #if defined to #ifdef
Our new CPP linter enforces this.
Diffstat (limited to 'rts/Task.c')
-rw-r--r--rts/Task.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/rts/Task.c b/rts/Task.c
index b8df4d2215..4376148c7a 100644
--- a/rts/Task.c
+++ b/rts/Task.c
@@ -334,7 +334,7 @@ boundTaskExiting (Task *task)
}
-#ifdef THREADED_RTS
+#if defined(THREADED_RTS)
#define TASK_ID(t) (t)->id
#else
#define TASK_ID(t) (t)
@@ -501,7 +501,7 @@ void rts_setInCallCapability (
Task *task = getTask();
task->preferred_capability = preferred_capability;
-#ifdef THREADED_RTS
+#if defined(THREADED_RTS)
if (affinity) {
if (RtsFlags.ParFlags.setAffinity) {
setThreadAffinity(preferred_capability, n_capabilities);
@@ -513,7 +513,7 @@ void rts_setInCallCapability (
void rts_pinThreadToNumaNode (
int node USED_IF_THREADS)
{
-#ifdef THREADED_RTS
+#if defined(THREADED_RTS)
if (RtsFlags.GcFlags.numa) {
Task *task = getTask();
task->node = capNoToNumaNode(node);
@@ -524,7 +524,7 @@ void rts_pinThreadToNumaNode (
#endif
}
-#ifdef DEBUG
+#if defined(DEBUG)
void printAllTasks(void);