equal
deleted
inserted
replaced
53 return NO_HASH; // Each locked region has own BoxLock node |
53 return NO_HASH; // Each locked region has own BoxLock node |
54 return Node::hash() + _slot + (_is_eliminated ? Compile::current()->fixed_slots() : 0); |
54 return Node::hash() + _slot + (_is_eliminated ? Compile::current()->fixed_slots() : 0); |
55 } |
55 } |
56 |
56 |
57 //------------------------------cmp-------------------------------------------- |
57 //------------------------------cmp-------------------------------------------- |
58 uint BoxLockNode::cmp( const Node &n ) const { |
58 bool BoxLockNode::cmp( const Node &n ) const { |
59 if (EliminateNestedLocks) |
59 if (EliminateNestedLocks) |
60 return (&n == this); // Always fail except on self |
60 return (&n == this); // Always fail except on self |
61 const BoxLockNode &bn = (const BoxLockNode &)n; |
61 const BoxLockNode &bn = (const BoxLockNode &)n; |
62 return bn._slot == _slot && bn._is_eliminated == _is_eliminated; |
62 return bn._slot == _slot && bn._is_eliminated == _is_eliminated; |
63 } |
63 } |
137 uint FastLockNode::hash() const { return NO_HASH; } |
137 uint FastLockNode::hash() const { return NO_HASH; } |
138 |
138 |
139 uint FastLockNode::size_of() const { return sizeof(*this); } |
139 uint FastLockNode::size_of() const { return sizeof(*this); } |
140 |
140 |
141 //------------------------------cmp-------------------------------------------- |
141 //------------------------------cmp-------------------------------------------- |
142 uint FastLockNode::cmp( const Node &n ) const { |
142 bool FastLockNode::cmp( const Node &n ) const { |
143 return (&n == this); // Always fail except on self |
143 return (&n == this); // Always fail except on self |
144 } |
144 } |
145 |
145 |
146 //============================================================================= |
146 //============================================================================= |
147 //-----------------------------hash-------------------------------------------- |
147 //-----------------------------hash-------------------------------------------- |
148 uint FastUnlockNode::hash() const { return NO_HASH; } |
148 uint FastUnlockNode::hash() const { return NO_HASH; } |
149 |
149 |
150 //------------------------------cmp-------------------------------------------- |
150 //------------------------------cmp-------------------------------------------- |
151 uint FastUnlockNode::cmp( const Node &n ) const { |
151 bool FastUnlockNode::cmp( const Node &n ) const { |
152 return (&n == this); // Always fail except on self |
152 return (&n == this); // Always fail except on self |
153 } |
153 } |
154 |
154 |
155 // |
155 // |
156 // Create a counter which counts the number of times this lock is acquired |
156 // Create a counter which counts the number of times this lock is acquired |