diff options
author | gdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4> | 2013-09-23 10:15:19 +0000 |
---|---|---|
committer | gdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4> | 2013-09-23 10:15:19 +0000 |
commit | 3d30779fd790358d280b4b61b5d1aaa0e697b554 (patch) | |
tree | b168cc0567c0741b050964c9bd78537310a4ab76 /os/rt | |
parent | 3a030950d34ddc07402b876ef4511494c6fafec8 (diff) | |
download | ChibiOS-3d30779fd790358d280b4b61b5d1aaa0e697b554.tar.gz ChibiOS-3d30779fd790358d280b4b61b5d1aaa0e697b554.tar.bz2 ChibiOS-3d30779fd790358d280b4b61b5d1aaa0e697b554.zip |
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/branches/kernel_3_dev@6313 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'os/rt')
-rw-r--r-- | os/rt/src/chthreads.c | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/os/rt/src/chthreads.c b/os/rt/src/chthreads.c index 042d90c5e..613810954 100644 --- a/os/rt/src/chthreads.c +++ b/os/rt/src/chthreads.c @@ -335,13 +335,14 @@ msg_t chThreadSuspendTimeoutS(thread_reference_t *trp, systime_t timeout) { void chThreadResumeI(thread_reference_t *trp, msg_t msg) {
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");
- (*trp)->p_u.rdymsg = msg;
- chSchReadyI(*trp);
*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) {
if (*trp != NULL) {
-
- chDbgAssert((*trp)->p_state == CH_STATE_SUSPENDED,
+ thread_t *tp = *trp;
+
+ chDbgAssert(tp->p_state == CH_STATE_SUSPENDED,
"not THD_STATE_SUSPENDED");
*trp = NULL;
- chSchWakeupS(*trp, msg);
+ chSchWakeupS(tp, msg);
}
}
|