From: lottaviano Date: Wed, 16 Sep 2009 13:51:30 +0000 (+0000) Subject: doc: Document proc_new(); move documentation around. X-Git-Tag: 2.2.0~15 X-Git-Url: https://codewiz.org/gitweb?a=commitdiff_plain;h=d977e866d070ab7b3196777b57e7a5ff2e02bdd6;p=bertos.git doc: Document proc_new(); move documentation around. git-svn-id: https://src.develer.com/svnoss/bertos/trunk@2953 38d2e660-2303-0410-9eaa-f027e97ec537 --- diff --git a/bertos/kern/proc.c b/bertos/kern/proc.c index e8e23637..57cda384 100644 --- a/bertos/kern/proc.c +++ b/bertos/kern/proc.c @@ -150,6 +150,14 @@ void proc_init(void) /** * Create a new process, starting at the provided entry point. * + * + * \note The function + * \code + * proc_new(entry, data, stacksize, stack) + * \endcode + * is a more convenient way to create a process, as you don't have to specify + * the name. + * * \return Process structure of new created process * if successful, NULL otherwise. */ diff --git a/bertos/kern/proc.h b/bertos/kern/proc.h index c28fd68f..4be0b25e 100644 --- a/bertos/kern/proc.h +++ b/bertos/kern/proc.h @@ -110,33 +110,28 @@ typedef struct Process */ void proc_init(void); -/** - * Create a new named process and schedules it for execution. - * - * When defining the stacksize take into account that you may want at least: - * \li save all the registers for each nested function call; - * \li have memory for the struct Process, which is positioned at the bottom - * of the stack; - * \li have some memory for temporary variables inside called functions. - * - * The value given by KERN_MINSTACKSIZE is rather safe to use in the first place. - * - * \note The function - * \code - * proc_new(entry, data, stacksize, stack) - * \endcode - * is a more convenient way to create a process, as you don't have to specify - * the name. - * - * \param name Name of the process (currently unused). - * \param entry Function that the process will execute. - * \param data Pointer to user data. - * \param stacksize Length of the stack. - * \param stack Pointer to the memory area to be used as a stack. - */ struct Process *proc_new_with_name(const char *name, void (*entry)(void), iptr_t data, size_t stacksize, cpu_stack_t *stack); #if !CONFIG_KERN_MONITOR + /** + * Create a new named process and schedules it for execution. + * + * When defining the stacksize take into account that you may want at least: + * \li save all the registers for each nested function call; + * \li have memory for the struct Process, which is positioned at the bottom + * of the stack; + * \li have some memory for temporary variables inside called functions. + * + * The value given by KERN_MINSTACKSIZE is rather safe to use in the first place. + * + * \param entry Function that the process will execute. + * \param data Pointer to user data. + * \param size Length of the stack. + * \param stack Pointer to the memory area to be used as a stack. + * + * \return Process structure of new created process + * if successful, NULL otherwise. + */ #define proc_new(entry,data,size,stack) proc_new_with_name(NULL,(entry),(data),(size),(stack)) #else #define proc_new(entry,data,size,stack) proc_new_with_name(#entry,(entry),(data),(size),(stack)) diff --git a/bertos/mware/formatwr.c b/bertos/mware/formatwr.c index 7baea75a..bf2672e9 100644 --- a/bertos/mware/formatwr.c +++ b/bertos/mware/formatwr.c @@ -46,7 +46,7 @@ * -D CONFIG_PRINTF=PRINTF_FULL Full ANSI printf formatter, with some C99 extensions * -D CONFIG_PRINTF=PRINTF_NOFLOAT Exclude support for floats * -D CONFIG_PRINTF=PRINTF_REDUCED Simplified formatter (see below) - * -D CONFIG_PRINTF=PRINTF_NOMODIFIERS Exclude 'l', 'z' and 'h' modifiers in reduced version + * -D CONFIG_PRINTF=PRINTF_NOMODIFIERS Exclude "l", "z" and "h" modifiers in reduced version * -D CONFIG_PRINTF=PRINTF_DISABLED No formatter at all * \endcode *