git-svn-id: svn://svn.code.sf.net/p/chibios/svn/branches/kernel_3_dev@6313 35acf78f-673a-0410-8e92-d51de3d6d3f4
This commit is contained in:
parent
3a030950d3
commit
3d30779fd7
|
@ -335,13 +335,14 @@ msg_t chThreadSuspendTimeoutS(thread_reference_t *trp, systime_t timeout) {
|
||||||
void chThreadResumeI(thread_reference_t *trp, msg_t msg) {
|
void chThreadResumeI(thread_reference_t *trp, msg_t msg) {
|
||||||
|
|
||||||
if (*trp != NULL) {
|
if (*trp != NULL) {
|
||||||
|
thread_t *tp = *trp;
|
||||||
|
|
||||||
chDbgAssert((*trp)->p_state == CH_STATE_SUSPENDED,
|
chDbgAssert(tp->p_state == CH_STATE_SUSPENDED,
|
||||||
"not THD_STATE_SUSPENDED");
|
"not THD_STATE_SUSPENDED");
|
||||||
|
|
||||||
(*trp)->p_u.rdymsg = msg;
|
|
||||||
chSchReadyI(*trp);
|
|
||||||
*trp = NULL;
|
*trp = NULL;
|
||||||
|
tp->p_u.rdymsg = msg;
|
||||||
|
chSchReadyI(tp);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -358,12 +359,13 @@ void chThreadResumeI(thread_reference_t *trp, msg_t msg) {
|
||||||
void chThreadResumeS(thread_reference_t *trp, msg_t msg) {
|
void chThreadResumeS(thread_reference_t *trp, msg_t msg) {
|
||||||
|
|
||||||
if (*trp != NULL) {
|
if (*trp != NULL) {
|
||||||
|
thread_t *tp = *trp;
|
||||||
|
|
||||||
chDbgAssert((*trp)->p_state == CH_STATE_SUSPENDED,
|
chDbgAssert(tp->p_state == CH_STATE_SUSPENDED,
|
||||||
"not THD_STATE_SUSPENDED");
|
"not THD_STATE_SUSPENDED");
|
||||||
|
|
||||||
*trp = NULL;
|
*trp = NULL;
|
||||||
chSchWakeupS(*trp, msg);
|
chSchWakeupS(tp, msg);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue