From 06e5c13b3d022b48523c1db0878ea67d6ed1fb89 Mon Sep 17 00:00:00 2001 From: Oleg Hahm Date: Wed, 20 Apr 2016 18:46:14 +0200 Subject: [PATCH 1/4] core: doc: do not exclude CPU specific values This patch ensures that doxygen will add the CPU dependent defines for stack sizes. --- core/include/thread.h | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/core/include/thread.h b/core/include/thread.h index f6fd31fee8..ad32ee1b21 100644 --- a/core/include/thread.h +++ b/core/include/thread.h @@ -102,13 +102,16 @@ struct _thread { #endif }; - /** +/** * @def THREAD_STACKSIZE_DEFAULT * @brief A reasonable default stack size that will suffice most smaller tasks */ #ifndef THREAD_STACKSIZE_DEFAULT #error THREAD_STACKSIZE_DEFAULT must be defined per CPU #endif +#ifdef DOXYGEN +#define THREAD_STACKSIZE_DEFAULT +#endif /** * @def THREAD_STACKSIZE_IDLE @@ -117,6 +120,9 @@ struct _thread { #ifndef THREAD_STACKSIZE_IDLE #error THREAD_STACKSIZE_IDLE must be defined per CPU #endif +#ifdef DOXYGEN +#define THREAD_STACKSIZE_IDLE +#endif /** * @def THREAD_EXTRA_STACKSIZE_PRINTF @@ -126,6 +132,9 @@ struct _thread { #ifndef THREAD_EXTRA_STACKSIZE_PRINTF #error THREAD_EXTRA_STACKSIZE_PRINTF must be defined per CPU #endif +#ifdef DOXYGEN +#define THREAD_EXTRA_STACKSIZE_PRINTF +#endif /** * @def THREAD_STACKSIZE_MAIN From f6e9a789edf673c68678b8d191dd4b4042fbe359 Mon Sep 17 00:00:00 2001 From: Oleg Hahm Date: Wed, 20 Apr 2016 18:47:04 +0200 Subject: [PATCH 2/4] random: doc: document generic PRNG interface The header was still referring to the Mersenne Twister only --- sys/include/random.h | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/sys/include/random.h b/sys/include/random.h index 853f399e34..954f394693 100644 --- a/sys/include/random.h +++ b/sys/include/random.h @@ -10,11 +10,17 @@ /** * @defgroup sys_random Random * @ingroup sys - * @brief Random number generator + * @brief Pseudo Random Number Generator (PRNG) * @{ * * @file - * @brief Mersenne Twister - a very fast random number generator + * @brief Common interface to the software PRNG + * + * Various implementations of a PRNG are available: + * - Tiny Mersenne Twister (default) + * - Mersenne Twister + * - Simple Park-Miller PRNG + * - Musl C PRNG */ #ifndef RANDOM_H @@ -31,7 +37,7 @@ extern "C" { #endif /** - * @brief initializes mt[N] with a seed + * @brief initializes PRNG with a seed * * @param s seed for the PRNG */ From 435685cf4a059a9b12452721b1340766c8bcf069 Mon Sep 17 00:00:00 2001 From: Oleg Hahm Date: Thu, 21 Apr 2016 14:38:13 +0200 Subject: [PATCH 3/4] doc: add missing information about thread_create --- core/include/thread.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/core/include/thread.h b/core/include/thread.h index ad32ee1b21..ebf597687c 100644 --- a/core/include/thread.h +++ b/core/include/thread.h @@ -200,7 +200,8 @@ struct _thread { * * Creating a new thread is done in two steps: * 1. the new thread's stack is initialized depending on the platform - * 2. the new thread is added to the scheduler to be run + * 2. the new thread is added to the scheduler and the scheduler is run (if not + * indicated otherwise) * * As RIOT is using a fixed priority scheduling algorithm, threads are * scheduled based on their priority. The priority is fixed for every thread From 1319c5e8743038e348d00da30831cd2f9e3c20e7 Mon Sep 17 00:00:00 2001 From: Oleg Hahm Date: Thu, 21 Apr 2016 15:00:13 +0200 Subject: [PATCH 4/4] doc: add a hint to cpu_conf.h --- core/include/thread.h | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/core/include/thread.h b/core/include/thread.h index ebf597687c..88828188b0 100644 --- a/core/include/thread.h +++ b/core/include/thread.h @@ -105,6 +105,9 @@ struct _thread { /** * @def THREAD_STACKSIZE_DEFAULT * @brief A reasonable default stack size that will suffice most smaller tasks + * + * @note This value must be defined by the CPU specific implementation, please + * take a look at @c cpu/$CPU/include/cpu_conf.h */ #ifndef THREAD_STACKSIZE_DEFAULT #error THREAD_STACKSIZE_DEFAULT must be defined per CPU @@ -116,6 +119,9 @@ struct _thread { /** * @def THREAD_STACKSIZE_IDLE * @brief Size of the idle task's stack in bytes + * + * @note This value must be defined by the CPU specific implementation, please + * take a look at @c cpu/$CPU/include/cpu_conf.h */ #ifndef THREAD_STACKSIZE_IDLE #error THREAD_STACKSIZE_IDLE must be defined per CPU @@ -128,6 +134,9 @@ struct _thread { * @def THREAD_EXTRA_STACKSIZE_PRINTF * @ingroup conf * @brief Size of the task's printf stack in bytes + * + * @note This value must be defined by the CPU specific implementation, please + * take a look at @c cpu/$CPU/include/cpu_conf.h */ #ifndef THREAD_EXTRA_STACKSIZE_PRINTF #error THREAD_EXTRA_STACKSIZE_PRINTF must be defined per CPU