summaryrefslogtreecommitdiff
path: root/rts/FileLock.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/FileLock.c
parente5b3492f23c2296d0d8221e1787ee585331f726e (diff)
downloadhaskell-945c45ad50ed31e3acb96fdaafb21640c4669f12.tar.gz
Prefer #if defined to #ifdef
Our new CPP linter enforces this.
Diffstat (limited to 'rts/FileLock.c')
-rw-r--r--rts/FileLock.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/rts/FileLock.c b/rts/FileLock.c
index f8e11ee1bf..ac21bea206 100644
--- a/rts/FileLock.c
+++ b/rts/FileLock.c
@@ -30,7 +30,7 @@ typedef struct {
static HashTable *obj_hash;
static HashTable *fd_hash;
-#ifdef THREADED_RTS
+#if defined(THREADED_RTS)
static Mutex file_lock_mutex;
#endif
@@ -54,7 +54,7 @@ initFileLocking(void)
{
obj_hash = allocHashTable_(hashLock, cmpLocks);
fd_hash = allocHashTable(); /* ordinary word-based table */
-#ifdef THREADED_RTS
+#if defined(THREADED_RTS)
initMutex(&file_lock_mutex);
#endif
}
@@ -70,7 +70,7 @@ freeFileLocking(void)
{
freeHashTable(obj_hash, freeLock);
freeHashTable(fd_hash, NULL);
-#ifdef THREADED_RTS
+#if defined(THREADED_RTS)
closeMutex(&file_lock_mutex);
#endif
}