This PR saves some memory by ommiting redundant output. The printing
of "jumpint into first task..." is obsolete, as the thread_create
calls are not checked for errors anymore.
Further the version print is moved into the main_trampoline. This
prevents the STDLIB from using precious stack space on the ISR
stack, on which it is running before jumping into main - hence
opening the option to decrease the stacksize for the ISR stack.
These functions are required for std::atomic in C++11 on Cortex-M0.
The functions are only used if GCC does not know how to generate any
lock-free atomic hardware operations.
As discussed in #2725, this commit renames a number of stacksize constants to
better convey their intended usage. In addition, constants for thread priority
are given a `THREAD_` prefix. Changes are:
* KERNEL_CONF_STACKSIZE_PRINTF renamed to THREAD_EXTRA_STACKSIZE_PRINTF
* KERNEL_CONF_STACKSIZE_DEFAULT renamed to THREAD_STACKSIZE_DEFAULT
* KERNEL_CONF_STACKSIZE_IDLE renamed to THREAD_STACKSIZE_IDLE
* KERNEL_CONF_STACKSIZE_MAIN renamed to THREAD_STACKSIZE_MAIN
* Move thread stacksizes from kernel.h to thread.h, since the prefix changed
* PRIORITY_MIN renamed to THREAD_PRIORITY_MIN
* PRIORITY_IDLE renamed to THREAD_PRIORITY_IDLE
* PRIORITY_MAIN renamed to THREAD_PRIORITY_MAIN
* Move thread priorities from kernel.h to thread.h since the prefix has changed
* MINIMUM_STACK_SIZE renamed to THREAD_STACKSIZE_MINIMUM for consistency
These headers do not provide full stl functionality,
but a small subset:
* thread and this_thread
* condition_variable (some timed functions are missing)
* mutex, lock_guard and unique_lock
- Move generic implementation of atomic_set_return to core/atomic.c
- Generic implementation of atomic compare and swap in core/atomic.c
- atomic_cas is used to implement atomic counters in core/include/atomic.h
- atomic_int_t is an atomic integer type
- ATOMIC_INIT can be used as an initializer for atomic_int_t
- ATOMIC_VALUE gets a reference to the value of an atomic integer