Ignore:
File:
1 edited

Legend:

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

    r1433ecda r826a0a97  
    3838#include <stacktrace.h>
    3939#include <stdint.h>
     40#include <task.h>
    4041
    4142static atomic_t failed_asserts = { 0 };
     
    4647         * Send the message safely to kio. Nested asserts should not occur.
    4748         */
    48         kio_printf("Assertion failed (%s) in file \"%s\", line %u.\n",
    49             cond, file, line);
     49        kio_printf("Assertion failed (%s) in task %ld, file \"%s\", line %u.\n",
     50            cond, (long) task_get_id(), file, line);
     51
     52        stacktrace_kio_print();
    5053
    5154        /* Sometimes we know in advance that regular printf() would likely fail. */
     
    5861         * Send the message safely to kio. Nested asserts should not occur.
    5962         */
    60         kio_printf("Assertion failed (%s) in file \"%s\", line %u.\n",
    61             cond, file, line);
     63        kio_printf("Assertion failed (%s) in task %ld, file \"%s\", line %u.\n",
     64            cond, (long) task_get_id(), file, line);
     65
     66        stacktrace_kio_print();
    6267
    6368        /*
     
    7277         * assertions.
    7378         */
    74         printf("Assertion failed (%s) in file \"%s\", line %u.\n",
    75             cond, file, line);
     79        kio_printf("Assertion failed (%s) in task %ld, file \"%s\", line %u.\n",
     80            cond, (long) task_get_id(), file, line);
    7681        stacktrace_print();
    7782
Note: See TracChangeset for help on using the changeset viewer.