-
Notifications
You must be signed in to change notification settings - Fork 2.1k
core: msg: update detail section on IPC #4475
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
Conversation
Arch users be advices that there is a bug in the most current doxygen version regarding the fenced code block syntax: https://bugzilla.gnome.org/show_bug.cgi?id=759177 |
* To send a message synchronous to a thread one uses the function | ||
* @ref msg_send_receive(). It sends a message and blocks the sending thread | ||
* until a response is received. The receiving thread uses the function | ||
* @ref msg_receive() to receive this message and must must reply to it with |
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.
must must
thx for taking the time to create examples! |
What example would I set if I would not give examples ;P
|
addressed comments |
* | ||
* Additionally, one can use @ref msg_send_receive() to simultaneously block | ||
* the sending thread and expect a response response from the receiving thread. | ||
* The receiving thread must use @ref msg_reply() to reply to the message of |
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.
"In this case, ..."
minor comments, but from my side, you can squash. |
Addressed comments and squashed immediately. |
Does this need to ACKs due to it [edit]technically[/edit] being a core change? |
nah. The two line code change doesn't chang anything semantically, so one ACK is OK. |
* Non-blocking IPC | ||
* ---------------- | ||
* For the non-blocking variant use @ref msg_try_send() or | ||
* @ref msg_try_receive() respectively. If a message is send in synchronous |
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.
"is sent"
found two more typos... fix if you feel like... IMHO we should skip travis on this (all but the static tests that check the docs). |
* respectively. | ||
* | ||
* Additionally, one can use @ref msg_send_receive() to simultaneously block | ||
* the sending thread and expect a response response from the receiving 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.
response response
* } | ||
* ~~~~~~~~~~~~~~~~~~~~~~~~ | ||
* | ||
* Time & messages |
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.
How about "Timing & messages"?
Thanks Martine for taking the initiative! No need to discuss on my proposed changes, adapt what you take as reasonable. |
Addressed last batch of comments. |
* mode or the message queue (see below) of the receiving thread is full | ||
* messages sent this way will be dropped. | ||
* | ||
* You can use the example on asynchronous IPC below but without the queue for |
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.
"for" too much I guess
@authmillenon sorry being so picky, but now that you're on it ;-) ! IMO it's fine to squash |
Addressed comments and squashed |
ACK from my side. @kaspar030 please have a look and merge then!!! |
@@ -148,7 +281,7 @@ int msg_send_int(msg_t *m, kernel_pid_t target_pid); | |||
*/ | |||
static inline int msg_sent_by_int(const msg_t *m) | |||
{ | |||
return (m->sender_pid == KERNEL_PID_ISR); | |||
return m->sender_pid == KERNEL_PID_ISR; |
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 did you remove these parens?
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.
It's in the piggybacked uncrustify commit.
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.
I guess we have to fix some settings there.
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.
It's one expression, so as far as I understand your parenthesis rules this should be right...
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.
(for e.g. two expressions the parenthesis would be kept around each)
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.
"My" rule is basically always to have parens around any condition. Especially, I don't see any reason to remove them.
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.
IMO ignore
sounds good.
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.
Changed and squashed immediately.
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.
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.
thx
I'm confused. @PeterKietzmann did you ACK or do you want @kaspar030 to ACK? |
IMHO its fine. Go! |
core: msg: update detail section on IPC
Release version in #4496 |
Merges IPC section of old doxygen mainpage and detailed description and enhances it with some introductory text and examples.
Since I have uncrustify run as a pre-commit hook I included some style fixes too in an extra commit.