summaryrefslogtreecommitdiff
path: root/rts/Messages.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/Messages.c
parente5b3492f23c2296d0d8221e1787ee585331f726e (diff)
downloadhaskell-945c45ad50ed31e3acb96fdaafb21640c4669f12.tar.gz
Prefer #if defined to #ifdef
Our new CPP linter enforces this.
Diffstat (limited to 'rts/Messages.c')
-rw-r--r--rts/Messages.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/rts/Messages.c b/rts/Messages.c
index 0bea626173..0508a20d20 100644
--- a/rts/Messages.c
+++ b/rts/Messages.c
@@ -19,13 +19,13 @@
Send a message to another Capability
------------------------------------------------------------------------- */
-#ifdef THREADED_RTS
+#if defined(THREADED_RTS)
void sendMessage(Capability *from_cap, Capability *to_cap, Message *msg)
{
ACQUIRE_LOCK(&to_cap->lock);
-#ifdef DEBUG
+#if defined(DEBUG)
{
const StgInfoTable *i = msg->header.info;
if (i != &stg_MSG_THROWTO_info &&
@@ -60,7 +60,7 @@ void sendMessage(Capability *from_cap, Capability *to_cap, Message *msg)
Handle a message
------------------------------------------------------------------------- */
-#ifdef THREADED_RTS
+#if defined(THREADED_RTS)
void
executeMessage (Capability *cap, Message *m)
@@ -207,7 +207,7 @@ loop:
{
owner = (StgTSO*)p;
-#ifdef THREADED_RTS
+#if defined(THREADED_RTS)
if (owner->cap != cap) {
sendMessage(cap, owner->cap, (Message*)msg);
debugTraceCap(DEBUG_sched, cap, "forwarding message to cap %d",
@@ -271,7 +271,7 @@ loop:
ASSERT(owner != END_TSO_QUEUE);
-#ifdef THREADED_RTS
+#if defined(THREADED_RTS)
if (owner->cap != cap) {
sendMessage(cap, owner->cap, (Message*)msg);
debugTraceCap(DEBUG_sched, cap, "forwarding message to cap %d",