Changes in / [36df27eb:08d4ea2] in mainline


Ignore:
Files:
1 added
1 deleted
18 edited

Legend:

Unmodified
Added
Removed
  • kernel/arch/arm32/include/arch/cache.h

    r36df27eb r08d4ea2  
    3939#include <typedefs.h>
    4040
    41 extern unsigned dcache_levels(void);
     41unsigned dcache_levels(void);
    4242
    43 extern void dcache_flush(void);
    44 extern void dcache_flush_invalidate(void);
    45 extern void cpu_dcache_flush(void);
    46 extern void cpu_dcache_flush_invalidate(void);
     43void dcache_flush(void);
     44void dcache_flush_invalidate(void);
     45void cpu_dcache_flush(void);
     46void cpu_dcache_flush_invalidate(void);
    4747extern void icache_invalidate(void);
    4848extern void dcache_invalidate(void);
     
    5050
    5151#endif
    52 
    5352/** @}
    5453 */
     54
  • kernel/generic/include/proc/task.h

    r36df27eb r08d4ea2  
    5858#include <udebug/udebug.h>
    5959#include <mm/as.h>
    60 #include <abi/proc/task.h>
    6160#include <abi/sysinfo.h>
    6261#include <arch.h>
  • kernel/generic/include/proc/thread.h

    r36df27eb r08d4ea2  
    4848#include <abi/proc/uarg.h>
    4949#include <udebug/udebug.h>
    50 #include <abi/proc/thread.h>
    5150#include <abi/sysinfo.h>
    5251#include <arch.h>
  • tools/ccheck.sh

    r36df27eb r08d4ea2  
    3636find abi kernel boot uspace -type f -regex '^.*\.[ch]$' | (
    3737while read fname; do
    38         outfile="$(mktemp)"
    39         $ccheck $fname >"$outfile" 2>&1
     38        $ccheck $fname >/tmp/ccheck.out 2>&1
    4039        rc=$?
    4140        if [ .$rc == .0 ]; then
    42                 if [ -s "$outfile" ] ; then
     41                if [ -s /tmp/ccheck.out ] ; then
    4342                        srepcnt=$((srepcnt + 1))
    44                         cat "$outfile"
     43                        echo '**' Reports for file $fname: '**'
     44                        cat /tmp/ccheck.out
    4545                else
    4646                        snorepcnt=$((snorepcnt + 1))
     
    4949                fcnt=$((fcnt + 1))
    5050        fi
    51 
    52         rm -f "$outfile"
    5351done
    5452
  • uspace/lib/c/generic/assert.c

    r36df27eb r08d4ea2  
    4141static atomic_t failed_asserts = {0};
    4242
    43 void __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 
    55 void __helenos_assert_abort(const char *cond, const char *file, unsigned int line)
     43void assert_abort(const char *cond, const char *file, unsigned int line)
    5644{
    5745        /*
  • uspace/lib/c/generic/malloc.c

    r36df27eb r08d4ea2  
    3333/** @file
    3434 */
    35 
    36 #define _HELENOS_SOURCE
    3735
    3836#include <malloc.h>
     
    198196static futex_t malloc_futex = FUTEX_INITIALIZER;
    199197
    200 #define malloc_assert(expr) safe_assert(expr)
     198#ifndef NDEBUG
     199
     200#define malloc_assert(expr) \
     201        do { \
     202                if (!(expr)) {\
     203                        heap_unlock(); \
     204                        assert_abort(#expr, __FILE__, __LINE__); \
     205                } \
     206        } while (0)
     207
     208#else /* NDEBUG */
     209
     210#define malloc_assert(expr)
     211
     212#endif /* NDEBUG */
     213
    201214
    202215#ifdef FUTEX_UPGRADABLE
  • uspace/lib/c/include/assert.h

    r36df27eb r08d4ea2  
    3434 */
    3535
    36 // XXX: The definition of `assert()` is not guarded.
    37 // One must not use `#pragma once` in this header.
    38 // This is in accordance with the C standard.
    39 
    4036#ifndef LIBC_ASSERT_H_
    4137#define LIBC_ASSERT_H_
    4238
    4339#define static_assert(expr)     _Static_assert(expr, "")
    44 
    45 extern void __helenos_assert_abort(const char *, const char *, unsigned int)
    46     __attribute__((noreturn));
    47 
    48 extern void __helenos_assert_quick_abort(const char *, const char *, unsigned int)
    49     __attribute__((noreturn));
    50 
    51 #endif
    5240
    5341/** Debugging assert macro
     
    6149 */
    6250
    63 #undef assert
     51#ifndef NDEBUG
    6452
    65 #ifndef NDEBUG
    66         #define assert(expr) ((expr) ? (void) 0 : __helenos_assert_abort(#expr, __FILE__, __LINE__))
    67 #else
    68         #define assert(expr) ((void) 0)
     53#define assert(expr) \
     54        do { \
     55                if (!(expr)) \
     56                        assert_abort(#expr, __FILE__, __LINE__); \
     57        } while (0)
     58
     59#else /* NDEBUG */
     60
     61#define assert(expr)
     62
     63#endif /* NDEBUG */
     64
     65extern void assert_abort(const char *, const char *, unsigned int)
     66    __attribute__((noreturn));
     67
    6968#endif
    70 
    71 #ifdef _HELENOS_SOURCE
    72 
    73 #undef safe_assert
    74 
    75 #ifndef NDEBUG
    76         #define safe_assert(expr) ((expr) ? (void) 0 : __helenos_assert_quick_abort(#expr, __FILE__, __LINE__))
    77 #else
    78         #define safe_assert(expr) ((void) 0)
    79 #endif
    80 
    81 #endif /* _HELENOS_SOURCE */
    8269
    8370/** @}
  • uspace/lib/c/include/fibril.h

    r36df27eb r08d4ea2  
    102102extern void fibril_remove_manager(void);
    103103extern fid_t fibril_get_id(void);
     104extern void fibril_inc_sercount(void);
     105extern void fibril_dec_sercount(void);
     106extern int fibril_get_sercount(void);
    104107
    105108static inline int fibril_yield(void)
  • uspace/lib/posix/include/posix/fcntl.h

    r36df27eb r08d4ea2  
    4141
    4242#include "sys/types.h"
     43#include "errno.h"
    4344
    4445#undef O_CREAT
  • uspace/lib/posix/include/posix/stdlib.h

    r36df27eb r08d4ea2  
    4040#define __POSIX_DEF__(x) x
    4141#endif
     42
     43#include "libc/stdlib.h"
    4244
    4345#include "sys/types.h"
  • uspace/lib/posix/source/fnmatch.c

    r36df27eb r08d4ea2  
    4949#include "posix/string.h"
    5050#include "posix/stdlib.h"
    51 #include <assert.h>
     51#include "posix/assert.h"
    5252
    5353#include "internal/common.h"
  • uspace/lib/posix/source/pwd.c

    r36df27eb r08d4ea2  
    4040#include "posix/string.h"
    4141#include <errno.h>
    42 #include <assert.h>
     42#include "posix/assert.h"
    4343
    4444static bool entry_read = false;
  • uspace/lib/posix/source/stdio.c

    r36df27eb r08d4ea2  
    4040#include "posix/stdio.h"
    4141
    42 #include <assert.h>
     42#include "posix/assert.h"
    4343
    4444#include <errno.h>
  • uspace/lib/posix/source/stdio/scanf.c

    r36df27eb r08d4ea2  
    3636#define __POSIX_DEF__(x) posix_##x
    3737
    38 #include <assert.h>
     38#include "posix/assert.h"
    3939
    4040#include <errno.h>
  • uspace/lib/posix/source/stdlib/strtold.c

    r36df27eb r08d4ea2  
    4040#include "posix/stdlib.h"
    4141
    42 #include <assert.h>
     42#include "posix/assert.h"
    4343#include "posix/ctype.h"
    4444#include "posix/stdint.h"
  • uspace/lib/posix/source/string.c

    r36df27eb r08d4ea2  
    4040#include "posix/string.h"
    4141
    42 #include <assert.h>
     42#include "posix/assert.h"
    4343
    4444#include <errno.h>
  • uspace/lib/posix/source/sys/wait.c

    r36df27eb r08d4ea2  
    4141
    4242#include "libc/task.h"
    43 #include <assert.h>
     43#include "posix/assert.h"
    4444
    4545#include <errno.h>
  • uspace/lib/posix/source/time.c

    r36df27eb r08d4ea2  
    4545
    4646#include "posix/signal.h"
    47 #include <assert.h>
     47#include "posix/assert.h"
    4848
    4949#include "libc/async.h"
Note: See TracChangeset for help on using the changeset viewer.