summaryrefslogtreecommitdiff
path: root/rts/FileLock.c
diff options
context:
space:
mode:
Diffstat (limited to 'rts/FileLock.c')
-rw-r--r--rts/FileLock.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/rts/FileLock.c b/rts/FileLock.c
index 3a05204932..cd2dc1d1dc 100644
--- a/rts/FileLock.c
+++ b/rts/FileLock.c
@@ -44,8 +44,9 @@ static int cmpLocks(StgWord w1, StgWord w2)
static int hashLock(HashTable *table, StgWord w)
{
Lock *l = (Lock *)w;
+ StgWord key = l->inode ^ (l->inode >> 32) ^ l->device ^ (l->device >> 32);
// Just xor all 32-bit words of inode and device, hope this is good enough.
- return hashWord(table, l->inode ^ (l->inode >> 32) ^ l->device ^ (l->device >> 32));
+ return hashWord(table, key);
}
void