Changeset 88e43bc in mainline


Ignore:
Timestamp:
2018-11-09T22:02:53Z (6 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:
436a0a5, c0ea739
Parents:
c5fe7f7
git-author:
Jiří Zárevúcky <zarevucky.jiri@…> (2018-11-09 21:50:12)
git-committer:
Jiří Zárevúcky <zarevucky.jiri@…> (2018-11-09 22:02:53)
Message:

Mark unreachable consistently in kernel

At least in places that were commented as such.

Location:
kernel
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • kernel/arch/amd64/src/userspace.c

    rc5fe7f7 r88e43bc  
    7575        );
    7676
    77         /* Unreachable */
    78         while (true)
    79                 ;
     77        unreachable();
    8078}
    8179
  • kernel/arch/arm32/src/userspace.c

    rc5fe7f7 r88e43bc  
    114114        );
    115115
    116         /* unreachable */
    117         while (true)
    118                 ;
     116        unreachable();
    119117}
    120118
  • kernel/arch/ia32/src/userspace.c

    rc5fe7f7 r88e43bc  
    7979            : "eax");
    8080
    81         /* Unreachable */
    82         while (true)
    83                 ;
     81        unreachable();
    8482}
    8583
  • kernel/arch/ppc32/src/ppc32.c

    rc5fe7f7 r88e43bc  
    297297            (uintptr_t) kernel_uarg->uspace_entry);
    298298
    299         /* Unreachable */
    300         while (true)
    301                 ;
     299        unreachable();
    302300}
    303301
  • kernel/generic/include/panic.h

    rc5fe7f7 r88e43bc  
    5353        panic_common(PANIC_MEMTRAP, istate, access, addr, fmt, ##__VA_ARGS__)
    5454
     55#define unreachable() \
     56        panic_assert("%s() at %s:%u:\nUnreachable line reached.", \
     57            __func__, __FILE__, __LINE__);
     58
    5559typedef enum {
    5660        PANIC_OTHER,
  • kernel/generic/src/proc/task.c

    rc5fe7f7 r88e43bc  
    628628{
    629629        task_kill_self(notify);
    630 
    631         /* Unreachable */
    632         return EOK;
     630        unreachable();
    633631}
    634632
  • kernel/generic/src/sysinfo/sysinfo.c

    rc5fe7f7 r88e43bc  
    294294        }
    295295
    296         /* Unreachable */
    297         assert(false);
    298         return NULL;
     296        unreachable();
    299297}
    300298
Note: See TracChangeset for help on using the changeset viewer.