There are now separate libs for benchmark, assert, printf, putchar
start/stop:
libs/libsel4benchmark
libs/libsel4assert
libs/libsel4printf
libs/libsel4putchar
libs/libsel4startstop
The primary changes are introducing sel4/sel4.h and removing std* types
plus porting assert and IO code from the kernel to libsel4assert,
libsel4printf, libsel4putchar.
This means the code within libsel4 and the newlibs do not overload any
typical libc entities. Instead the libraries use types like
seL4_Uint32 ... instead of uint32_t. And printf is now seL4_Printf and
assert is seL4_Assert ....
Finally, the only file modified that effects kernel code is
kernel/tools/bitfield_gen.py. It needed to be modified as it generates
files for both kernel and user space. And for user space the generated code
(types_gen.h) needed to use the new types and asserts. The changes should
not change what is generated for the kernel and I did a comparison of
kernel_final.{c|s} before and after my change and the only differences
were time stamps.
Bug: #15 Streamline kernel/libsel4 and remove its libc dependencies
36 lines
824 B
C
36 lines
824 B
C
/*
|
|
* Copyright 2014, NICTA
|
|
*
|
|
* This software may be distributed and modified according to the terms of
|
|
* the BSD 2-Clause license. Note that NO WARRANTY is provided.
|
|
* See "LICENSE_BSD2.txt" for details.
|
|
*
|
|
* @TAG(NICTA_BSD)
|
|
*/
|
|
|
|
/**
|
|
* Declares macros and methods which are conditional based
|
|
* on NDEBUG. If NDEBUG is defined then seL4_DebugAssert
|
|
* is a NOP, otherwise it invokes the unconditional version
|
|
* in sel4/assert.h.
|
|
*/
|
|
#ifndef __LIBSEL4_DEBUG_ASSERT_H
|
|
#define __LIBSEL4_DEBUG_ASSERT_H
|
|
|
|
#ifdef NDEBUG
|
|
|
|
/** NDEBUG is defined do nothing */
|
|
#define seL4_DebugAssert(expr) ((void)(0))
|
|
|
|
#else // NDEBUG is not defined
|
|
|
|
#include <sel4/assert.h>
|
|
|
|
/**
|
|
* NDEBUG is not defined invoke seL4_Assert(expr).
|
|
*/
|
|
#define seL4_DebugAssert(expr) seL4_Assert(expr)
|
|
|
|
#endif // NDEBUG
|
|
|
|
#endif // __LIBSEL4_DEBUG_ASSERT_H
|