Reformat.
[bertos.git] / bertos / kern / proc.c
index 66caa2db3c7f87c7d2c2d87705a47165409707ea..6bf67a80c189e72040ae0bbc525b1b3f14fcfe51 100644 (file)
@@ -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.
  */
@@ -167,14 +175,14 @@ struct Process *proc_new_with_name(UNUSED_ARG(const char *, name), void (*entry)
        PROC_ATOMIC(stack_base = (cpu_stack_t *)list_remHead(&StackFreeList));
        ASSERT(stack_base);
 
-       stack_size = CONFIG_KERN_MINSTACKSIZE;
+       stack_size = KERN_MINSTACKSIZE;
 #elif CONFIG_KERN_HEAP
        /* Did the caller provide a stack for us? */
        if (!stack_base)
        {
                /* Did the caller specify the desired stack size? */
                if (!stack_size)
-                       stack_size = CONFIG_KERN_MINSTACKSIZE;
+                       stack_size = KERN_MINSTACKSIZE;
 
                /* Allocate stack dinamically */
                if (!(stack_base = heap_alloc(stack_size)))
@@ -244,9 +252,9 @@ struct Process *proc_new_with_name(UNUSED_ARG(const char *, name), void (*entry)
                makecontext(&proc->context, (void (*)(void))proc_entry, 1, entry);
 
        #else // !CONFIG_KERN_PREEMPT
-       
+
                CPU_CREATE_NEW_STACK(proc->stack, entry, proc_exit);
-               
+
        #endif // CONFIG_KERN_PREEMPT
 
        #if CONFIG_KERN_MONITOR