protected final VmThreadQueueEntry removeFromQueue(VmThreadQueueEntry queue,
static VmThreadQueueEntry removeFromQueue(VmThreadQueueEntry queue,
    protected final VmThreadQueueEntry removeFromQueue(VmThreadQueueEntry queue,            VmThreadQueueEntry entry) {        if (queue == null) {            return queue;        } else if (entry == null) {            return queue;        } else if (queue == entry) {            VmThreadQueueEntry result = entry.next;            entry.next = null;            entry.resetQueue(this);            return result;        } else {            VmThreadQueueEntry t = queue;            while ((t.next != null) && (t.next != entry)) {                t = t.next;            }            if (t.next == entry) {                t.next = entry.next;                entry.next = null;                entry.resetQueue(this);            }            return queue;        }    }