From 349bec1f0fc1bd2bf045bd404576f21c36c9c9af Mon Sep 17 00:00:00 2001 From: Oleg Hahm Date: Wed, 27 Mar 2013 16:58:07 +0100 Subject: [PATCH] * added documentation to kernel_intern.h --- core/include/kernel_intern.h | 46 ++++++++++++++++++++++++++++-------- 1 file changed, 36 insertions(+), 10 deletions(-) diff --git a/core/include/kernel_intern.h b/core/include/kernel_intern.h index 606bc6e499..0ef0daa0e5 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 - */ - -/* - * kernel_intern.h - * - * Created on: 10.02.09 - * Author: kaspar + * @author INRIA + * @author Oliver Hahm */ #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); /** @} */