entry.next = t;
entry.setNext(t);
    protected final VmThreadQueueEntry addToQueue(VmThreadQueueEntry queue,            VmThreadQueueEntry entry, boolean ignorePriority) {        entry.setQueue(this);        if (queue == null) {            return entry;        } else if (ignorePriority) {            VmThreadQueueEntry t = queue;            while (t.next != null) {                t = t.next;            }            t.next = entry;            return queue;        } else {            final int priority = entry.thread.priority;            VmThreadQueueEntry t = queue;            if (priority > t.thread.priority) {                entry.next = t;                return entry;            }            while (t.next != null) {                if (priority > t.next.thread.priority) {                    entry.next = t.next;                    t.next = entry;                    return queue;                }                t = t.next;            }            t.next = entry;            return queue;        }    }