-
Notifications
You must be signed in to change notification settings - Fork 2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
core: improved doxygen documentation #958
core: improved doxygen documentation #958
Conversation
* | ||
* @return returns <0 on error, pid of newly created task else. | ||
* @param stack[out] stack Lowest address of preallocated stack space |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
:s/stack Lowest/Lowest/
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
also @param[out] stack
instead of @param stack[out]
.
* @{ | ||
*/ | ||
#define CREATE_SLEEPING (1) /**< set the new thread to sleeping */ | ||
#define AUTO_FREE (2) /**< TODO */ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this was never used in RIOT.
the intention is to say that the "system" has to free the threads stack after termination
@haukepetersen ping? |
I know, I know... |
Issues are addressed, please have a look on this again. |
* @{ | ||
*/ | ||
#define CREATE_SLEEPING (1) /**< set the new thread to sleeping */ | ||
#define AUTO_FREE (2) /**< the system has to free the stack after termination */ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"(currently unimplemented)"
@Kijewski fixed. |
* YIELD: force context switch. | ||
* CREATE_SLEEPING: set new thread to sleeping state, thread must be woken up manually. | ||
* CREATE_STACKTEST: initialize stack with values needed for stack overflow testing. | ||
* The highest possible priority is *PRIORITY_IDLE - 1*. The value is depending |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"highest possible priority" is ambiguous: first "... with 0 being the highest possible priority." and in this line "The highest possible priority is ... 30 for 32-bit systems, 15 for 16-bit systems."
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
14 for 16 bit system, otherwise it will clash with the idle thread.
fixed priority description |
* Only works if the thread was created with the flag CREATE_STACKTEST. | ||
* | ||
* @param stack The stack you want to measure. try active_thread->stack_start. | ||
* @return The amount of unused space of the thread's stack | ||
* @param[in] stack the stack you want to measure. try active_thread->stack_start |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
mark as code -> active_thread->stack_start
@thomaseichinger done |
looks good to me, ACK |
* In addition to just printing the given information *DEBUGF* will further | ||
* print extended debug information about the current thread and function. | ||
* | ||
* @warning *DEBUGF* will halt the system and will never return! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Uh?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Better suggestions? - how should I know what these things do :-)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why and how would DEBUGF
halt the system?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh, my mistake - I missread the while loop. But wtf is this loop for anyhow? ... while(0)
???
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's the usual way to define multi-line macros in C:
http://bytes.com/groups/c/219859-do-while-0-macro-substitutions
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, I see (just havn't seen it before...).
@OlegHahm all addressed. |
* usage (for debugging and profiling purposes) | ||
* | ||
* @param[out] stack start address of the preallocated stack memory | ||
* @param[in] stacksize the size of the threads stack in bytes |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thread's
* @param[out] stack start address of the preallocated stack memory | ||
* @param[in] stacksize the size of the threads stack in bytes | ||
* @param[in] priority priority of the new thread, lower mean higher priority | ||
* @param[in] flags optional options for the new thread |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
optional flags for the creation of the new thread
Somebody cares to give a second ack? |
Ah, squash it! |
ACK, there you go |
squashed. @thomaseichinger now I have two ACKs from you... :-) |
improved files complient to issue RIOT-OS#950 - thread.h - flags.h - debug.h - crash.h
Your commit message has a typo .. compliant. |
ACK |
and go. |
core: improved doxygen documentation
improved files complient to issue #950