diff --git a/core/include/kernel_intern.h b/core/include/kernel_intern.h index 606bc6e49928f451bcce4716cb931a9a05730edf..0ef0daa0e59f5e079272a68ecbbbfb022861520f 100644 --- a/core/include/kernel_intern.h +++ b/core/include/kernel_intern.h @@ -2,25 +2,51 @@ * @ingroup kernel * @{ * @file - * @author Freie Universität Berlin, Computer Systems & Telematics - * @author Kaspar Schleiser <kaspar@schleiser.de> - */ - -/* - * kernel_intern.h - * - * Created on: 10.02.09 - * Author: kaspar + * @author INRIA + * @author Oliver Hahm <oliver.hahm@inria.fr> */ #ifndef KERNEL_INTERN_H_ #define KERNEL_INTERN_H_ +/** + * @brief Initializes scheduler and creates main and idle task + */ void kernel_init(void); -void board_init_drivers(void); + +/** + * @brief Optionally: initializes platform specifics (devices, pin configuration etc.) + */ +void board_init(void); + +/** + * @brief Gets called upon thread creation to set CPU registers + * + * @param[in] task_func First function to call within the thread + * @param[in] stack_start Start address of the stack + * @param[in] stack_size Stack size + * + * @return stack pointer + */ char *thread_stack_init(void *task_func, void *stack_start, int stack_size); + +/** + * @brief Removes thread from scheduler and set status to STATUS_STOPPED + */ void sched_task_exit(void); + +/** + * @brief Prints human readable, ps-like thread information for debugging purposes + */ void thread_print_stack (void); + +/** + * @brief Calculates stack usage if thread was created using CREATE_STACKTEST + * + * @param[in] stack The thread's stack + * + * @return The current usage (overwritten addresses) of the thread's stack + */ int thread_measure_stack_usage(char* stack); /** @} */