OSDN Git Service

ART: Fix lock max count definition
authorDmitry Petrochenko <dmitry.petrochenko@intel.com>
Mon, 28 Jul 2014 10:40:16 +0000 (17:40 +0700)
committerDmitry Petrochenko <dmitry.petrochenko@intel.com>
Mon, 4 Aug 2014 01:38:46 +0000 (01:38 +0000)
The lock max count should utilize 14 bits since 2 highest bits are reserved for lock state.

Change-Id: I9d562f7bca9c0853231800a706a8523204e8aa9d
Signed-off-by: Dmitry Petrochenko <dmitry.petrochenko@intel.com>
Signed-off-by: Serguei Katkov <serguei.i.katkov@intel.com>
runtime/lock_word.h

index ab86eaa..e585412 100644 (file)
@@ -65,7 +65,7 @@ class LockWord {
     kThinLockOwnerMask = (1 << kThinLockOwnerSize) - 1,
     // Count in higher bits.
     kThinLockCountShift = kThinLockOwnerSize + kThinLockOwnerShift,
-    kThinLockCountMask = (1 << kThinLockCountShift) - 1,
+    kThinLockCountMask = (1 << kThinLockCountSize) - 1,
     kThinLockMaxCount = kThinLockCountMask,
 
     // State in the highest bits.