From 8cdf2dba5b8113538f2c7c8c7728cc868398d636 Mon Sep 17 00:00:00 2001 From: gdisirio Date: Wed, 20 Jan 2010 21:08:28 +0000 Subject: [PATCH] git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@1535 35acf78f-673a-0410-8e92-d51de3d6d3f4 --- os/kernel/src/chmsg.c | 9 +++++---- readme.txt | 1 + 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/os/kernel/src/chmsg.c b/os/kernel/src/chmsg.c index 2f5a7a127..6c0c6a81a 100644 --- a/os/kernel/src/chmsg.c +++ b/os/kernel/src/chmsg.c @@ -44,17 +44,18 @@ * @return The return message from @p chMsgRelease(). */ msg_t chMsgSend(Thread *tp, msg_t msg) { + Thread *ctp = currp; chDbgCheck(tp != NULL, "chMsgSend"); chSysLock(); - currp->p_msg = msg; - currp->p_u.wtobjp = &tp->p_msgqueue; - msg_insert(currp, &tp->p_msgqueue); + ctp->p_msg = msg; + ctp->p_u.wtobjp = &tp->p_msgqueue; + msg_insert(ctp, &tp->p_msgqueue); if (tp->p_state == THD_STATE_WTMSG) chSchReadyI(tp); chSchGoSleepS(THD_STATE_SNDMSG); - msg = currp->p_u.rdymsg; + msg = ctp->p_u.rdymsg; chSysUnlock(); return msg; } diff --git a/readme.txt b/readme.txt index 52364ff3d..08952fe6f 100644 --- a/readme.txt +++ b/readme.txt @@ -60,6 +60,7 @@ do not support this non standard construct. - CHANGE: Modified the thread-related constant macros to have a THD_ prefix. - OPT: Optimizations to the priority inheritance code. +- OPT: Speed/size optimization to the synchronous messages subsystem. *** 1.3.8 *** - FIX: Fixed dequeuing in lifo_remove() function (bug 2928142).