kernel - lwkt_token revamp
[dragonfly.git] / sys / ddb / db_ps.c
index 8faa343..ef128a1 100644 (file)
@@ -201,15 +201,15 @@ db_dump_td_tokens(thread_t td)
        lwkt_tokref_t ref;
        lwkt_token_t tok;
 
-       if (td->td_toks == NULL)
+       if (TD_TOKS_NOT_HELD(td))
                return;
        db_printf("    TOKENS:");
-       for (ref = td->td_toks; ref; ref = ref->tr_next) {
+       for (ref = &td->td_toks_base; ref < td->td_toks_stop; ++ref) {
                tok = ref->tr_tok;
 
                db_printf(" %p[tok=%p", ref, ref->tr_tok);
 #ifdef SMP
-               if (td == tok->t_owner)
+               if (td == tok->t_ref->tr_owner)
                    db_printf(",held");
 #endif
                db_printf("]");