Fork us on GitHub Follow us on Facebook Follow us on Twitter

Changeset 12c38f5 in mainline


Ignore:
Timestamp:
2010-10-25T18:48:26Z (10 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
master
Children:
619e2a6b
Parents:
1fa010c
Message:

Do not attempt to print the caller's stack twice in print_deadlock().
Print the matching "waits for" - "owned by" pair together.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/c/generic/fibril_synch.c

    r1fa010c r12c38f5  
    7373        fibril_t *f = (fibril_t *) fibril_get_id();
    7474
    75         printf("Deadlock detected: ");
     75        printf("Deadlock detected.\n");
     76        stacktrace_print();
    7677
    7778        printf("Fibril %p waits for primitive %p.\n", f, oi);
    78         stacktrace_print();
    7979
    8080        while (oi && oi->owned_by) {
    81                 printf(". ");
    8281                printf("Primitive %p is owned by fibril %p.\n",
    8382                    oi, oi->owned_by);
     83                if (oi->owned_by == f)
     84                        break;
    8485                stacktrace_print_fp_pc(oi->owned_by->ctx.ebp,
    8586                    oi->owned_by->ctx.pc);
    86                 if (oi->owned_by == f)
    87                         break;
    8887                printf("Fibril %p waits for primitive %p.\n",
    8988                     oi->owned_by, oi->owned_by->waits_for);
Note: See TracChangeset for help on using the changeset viewer.