Skip to content
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

Merged
merged 1 commit into from
May 15, 2014

Conversation

haukepetersen
Copy link
Contributor

improved files complient to issue #950

  • thread.h
  • flags.h
  • debug.h
  • crash.h

*
* @return returns <0 on error, pid of newly created task else.
* @param stack[out] stack Lowest address of preallocated stack space
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:s/stack Lowest/Lowest/

Copy link
Member

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 */
Copy link
Contributor

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

@mehlis
Copy link
Contributor

mehlis commented Apr 16, 2014

@haukepetersen ping?

@haukepetersen
Copy link
Contributor Author

I know, I know...

@haukepetersen
Copy link
Contributor Author

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 */
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"(currently unimplemented)"

@haukepetersen
Copy link
Contributor Author

@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
Copy link
Member

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."

Copy link
Contributor

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.

@haukepetersen
Copy link
Contributor Author

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
Copy link
Member

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

@haukepetersen
Copy link
Contributor Author

@thomaseichinger done

@thomaseichinger
Copy link
Member

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!
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Uh?

Copy link
Contributor Author

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 :-)

Copy link
Member

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?

Copy link
Contributor Author

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)???

Copy link
Member

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

Copy link
Contributor Author

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...).

@haukepetersen
Copy link
Contributor Author

@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
Copy link
Member

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
Copy link
Member

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

@haukepetersen
Copy link
Contributor Author

Somebody cares to give a second ack?

@LudwigKnuepfer
Copy link
Member

Ah, squash it!

@thomaseichinger
Copy link
Member

ACK, there you go

@haukepetersen
Copy link
Contributor Author

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
@LudwigKnuepfer
Copy link
Member

Your commit message has a typo .. compliant.

@LudwigKnuepfer
Copy link
Member

ACK

@haukepetersen
Copy link
Contributor Author

and go.

haukepetersen added a commit that referenced this pull request May 15, 2014
core: improved doxygen documentation
@haukepetersen haukepetersen merged commit ea18816 into RIOT-OS:master May 15, 2014
@haukepetersen haukepetersen deleted the doxygen_fix_core_1 branch May 15, 2014 09:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: doc Area: Documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

7 participants