Changeset 498ced1 in mainline for uspace/lib/c/generic/assert.c


Ignore:
Timestamp:
2018-08-11T02:43:32Z (7 years ago)
Author:
Jiří Zárevúcky <jiri.zarevucky@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
05882233
Parents:
b13d80b
git-author:
Jiří Zárevúcky <jiri.zarevucky@…> (2018-08-11 02:29:02)
git-committer:
Jiří Zárevúcky <jiri.zarevucky@…> (2018-08-11 02:43:32)
Message:

Unify reference counting and remove some unnecessary instances of <atomic.h>

File:
1 edited

Legend:

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

    rb13d80b r498ced1  
    3535#include <io/kio.h>
    3636#include <stdlib.h>
    37 #include <atomic.h>
    3837#include <stacktrace.h>
    3938#include <stdint.h>
    4039#include <task.h>
    4140
    42 static atomic_t failed_asserts = { 0 };
     41__thread int failed_asserts = 0;
    4342
    4443void __helenos_assert_quick_abort(const char *cond, const char *file, unsigned int line)
     
    6968         * Check if this is a nested or parallel assert.
    7069         */
    71         if (atomic_postinc(&failed_asserts))
     70        failed_asserts++;
     71        if (failed_asserts > 0)
    7272                abort();
    7373
Note: See TracChangeset for help on using the changeset viewer.