コード例 #1
0
 public void clear() {
   for (Node n = head.next; n != null; n = n.next) {
     Node.release(n);
     assert n.getRefCnt() == 0;
     n.clearEntry();
     Node.free(n);
   }
   head.next = null;
 }
コード例 #2
0
 public void cancel(Node n) {
   // It's possible (although very unlikely) that this release operation sets n.refcnt to 0,
   // in which case n.refcnt could have been incremented from 0 by found(Node n) above.
   // Hence, n.refcnt can be decremented to 0 two times; so even when n.refcnt is 0,
   // we don't decrement n.next.refcnt immediately since it can double-decrement
   // n.next.refcnt.
   // We decrement n.next.refcnt in Node.alloc(), where we know that only a single thread is
   // accessing the node.
   Node.release(n);
 }
コード例 #3
0
 void release(Node b, Node n) {
   Node.release(n);
   Node.release(b);
 }
コード例 #4
0
 void release(Node b, Node n, Node f) {
   Node.release(f);
   Node.release(n);
   Node.release(b);
 }
コード例 #5
0
 void release(Node n) {
   Node.release(n);
 }