Changeset e8d3c6f5 in mainline for uspace/lib/c/generic/assert.c


Ignore:
Timestamp:
2018-01-13T00:38:49Z (7 years ago)
Author:
Jiří Zárevúcky <zarevucky.jiri@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
36f0738
Parents:
9ba415e
git-author:
Jiří Zárevúcky <zarevucky.jiri@…> (2018-01-12 23:46:12)
git-committer:
Jiří Zárevúcky <zarevucky.jiri@…> (2018-01-13 00:38:49)
Message:

Align <assert.h> with standards, remove it from libposix,
and do not let malloc() use printf() with corrupted heap.

File:
1 edited

Legend:

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

    r9ba415e re8d3c6f5  
    4141static atomic_t failed_asserts = {0};
    4242
    43 void assert_abort(const char *cond, const char *file, unsigned int line)
     43void __helenos_assert_quick_abort(const char *cond, const char *file, unsigned int line)
     44{
     45        /*
     46         * Send the message safely to kio. Nested asserts should not occur.
     47         */
     48        kio_printf("Assertion failed (%s) in file \"%s\", line %u.\n",
     49            cond, file, line);
     50       
     51        /* Sometimes we know in advance that regular printf() would likely fail. */
     52        abort();
     53}
     54
     55void __helenos_assert_abort(const char *cond, const char *file, unsigned int line)
    4456{
    4557        /*
Note: See TracChangeset for help on using the changeset viewer.