diff options
Diffstat (limited to 'os/rt/src/chdynamic.c')
-rw-r--r-- | os/rt/src/chdynamic.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/os/rt/src/chdynamic.c b/os/rt/src/chdynamic.c index 185a456b3..c2fca8534 100644 --- a/os/rt/src/chdynamic.c +++ b/os/rt/src/chdynamic.c @@ -93,7 +93,8 @@ void chThdRelease(thread_t *tp) { chSysLock();
chDbgAssert(tp->p_refs > 0, "not referenced");
- refs = --tp->p_refs;
+ tp->p_refs--;
+ refs = tp->p_refs;
chSysUnlock();
/* If the references counter reaches zero and the thread is in its
|