Lines Matching defs:node

17 // is flushed and the new lock epoch is started. The node ids from the old
150 // Allocate new deadlock detector node.
153 // Associate 'data' (opaque user's object) with the new node.
181 // Get data associated with the node created by newNode().
182 uptr getData(uptr node) const { return data_[nodeToIndex(node)]; }
184 bool nodeBelongsToCurrentEpoch(uptr node) {
185 return node && (node / size() * size()) == current_epoch_;
188 void removeNode(uptr node) {
189 uptr idx = nodeToIndex(node);
208 u32 findLockContext(DeadlockDetectorTLS<BV> *dtls, uptr node) {
209 return dtls->findLockContext(nodeToIndex(node));
296 // add the node to the currently held locks w/o chanding the global state.
298 bool onFirstLock(DeadlockDetectorTLS<BV> *dtls, uptr node, u32 stk = 0) {
300 if (dtls->getEpoch() && dtls->getEpoch() == nodeToEpoch(node)) {
301 dtls->addLock(nodeToIndexUnchecked(node), nodeToEpoch(node), stk);
325 void onUnlock(DeadlockDetectorTLS<BV> *dtls, uptr node) {
326 if (dtls->getEpoch() == nodeToEpoch(node))
327 dtls->removeLock(nodeToIndexUnchecked(node));
334 bool onLockFast(DeadlockDetectorTLS<BV> *dtls, uptr node, u32 stk = 0) {
335 if (hasAllEdges(dtls, node)) {
336 dtls->addLock(nodeToIndexUnchecked(node), nodeToEpoch(node), stk);
342 bool isHeld(DeadlockDetectorTLS<BV> *dtls, uptr node) const {
343 return dtls->getLocks(current_epoch_).getBit(nodeToIndex(node));
365 void check_node(uptr node) const {
366 CHECK_GE(node, size());
367 CHECK_EQ(current_epoch_, nodeToEpoch(node));
375 uptr nodeToIndexUnchecked(uptr node) const { return node % size(); }
377 uptr nodeToIndex(uptr node) const {
378 check_node(node);
379 return nodeToIndexUnchecked(node);
382 uptr nodeToEpoch(uptr node) const { return node / size() * size(); }