[commit: ghc] master: rts: delint FileLock.c (2e1a0ba)

git at git.haskell.org git at git.haskell.org
Mon Jul 28 14:36:25 UTC 2014


Repository : ssh://git@git.haskell.org/ghc

On branch  : master
Link       : http://ghc.haskell.org/trac/ghc/changeset/2e1a0ba1229446fb0c40ff48d4790eeec4029018/ghc

>---------------------------------------------------------------

commit 2e1a0ba1229446fb0c40ff48d4790eeec4029018
Author: Austin Seipp <austin at well-typed.com>
Date:   Mon Jul 21 20:25:00 2014 -0500

    rts: delint FileLock.c
    
    Signed-off-by: Austin Seipp <austin at well-typed.com>


>---------------------------------------------------------------

2e1a0ba1229446fb0c40ff48d4790eeec4029018
 rts/FileLock.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/rts/FileLock.c b/rts/FileLock.c
index 3a05204..cd2dc1d 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



More information about the ghc-commits mailing list