git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@223 35acf78f-673a-0410-8e92-d51de3d6d3f4

master
gdisirio 2008-03-11 16:42:20 +00:00
parent 88c256ae52
commit 869cacb3d4
3 changed files with 16 additions and 15 deletions

View File

@ -65,6 +65,8 @@ AVR-AT90CANx-GCC - Port on AVR AT90CAN128, not tested on hardware yet.
*** 0.6.1 ***
- Removed some redundant checks from the scheduler code: improved threads
flyback time.
- Manual optimization in chSchReadyI(), it seems GCC is missing some obvious
code optimizations here. Both code size and speed improved.
- Removed the -falign-functions=16 option from the AT91SAM7X demo makefiles,
the Atmel chip does not require it, the option is still present on the
LPC21xx demos. This saves significant ROM space.

View File

@ -24,7 +24,7 @@
#include <ch.h>
/** @cond never*/
/** @cond never */
ReadyList rlist;
/** @endcond */
@ -58,10 +58,11 @@ INLINE void chSchReadyI(Thread *tp, msg_t msg) {
#else
void chSchReadyI(Thread *tp, msg_t msg) {
#endif
Thread *cp = rlist.r_queue.p_next;
Thread *cp;
tp->p_state = PRREADY;
tp->p_rdymsg = msg;
cp = rlist.r_queue.p_next;
while (cp->p_prio >= tp->p_prio)
cp = cp->p_next;
/* Insertion on p_prev.*/

View File

@ -107,30 +107,28 @@ struct Thread {
#endif
};
/** Thread state: Reserved.*/
#define PRFREE 0
/** Thread state: Thread in the ready list.*/
#define PRREADY 0
/** Thread state: Current.*/
#define PRCURR 1
/** Thread state: Thread in the ready list.*/
#define PRREADY 2
/** Thread state: Thread created in suspended state.*/
#define PRSUSPENDED 3
#define PRSUSPENDED 2
/** Thread state: Waiting on a semaphore.*/
#define PRWTSEM 4
#define PRWTSEM 3
/** Thread state: Waiting on a mutex.*/
#define PRWTMTX 5
#define PRWTMTX 4
/** Thread state: Waiting in \p chThdSleep() or \p chThdSleepUntil().*/
#define PRSLEEP 6
#define PRSLEEP 5
/** Thread state: Waiting in \p chThdWait().*/
#define PRWAIT 7
#define PRWAIT 6
/** Thread state: Waiting in \p chEvtWait().*/
#define PRWTEVENT 8
#define PRWTEVENT 7
/** Thread state: Waiting in \p chMsgSend().*/
#define PRSNDMSG 9
#define PRSNDMSG 8
/** Thread state: Waiting in \p chMsgWait().*/
#define PRWTMSG 10
#define PRWTMSG 9
/** Thread state: After termination.*/
#define PREXIT 11
#define PREXIT 10
#ifdef CH_USE_TERMINATE
/** Thread option: Termination requested flag.*/