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

This commit is contained in:
gdisirio 2008-11-03 21:34:42 +00:00
parent 696ce03ab3
commit 1a3658c66a
6 changed files with 7 additions and 5 deletions

View File

@ -75,6 +75,8 @@ Win32-MinGW - ChibiOS/RT simulator and demo into a WIN32 process,
*** 0.7.4 *** *** 0.7.4 ***
- Added a new benchmark to the test suite (timers set/reset performance). - Added a new benchmark to the test suite (timers set/reset performance).
- Renamed the macro fifo_init() to queue_init() because it is used to init
both FIFO queues and priority queues.
*** 0.7.3 *** *** 0.7.3 ***
- FIX: Fixed a bug in chThdSleepUntil(), this API is no more a macro now. - FIX: Fixed a bug in chThdSleepUntil(), this API is no more a macro now.

View File

@ -32,7 +32,7 @@
*/ */
void chMtxInit(Mutex *mp) { void chMtxInit(Mutex *mp) {
fifo_init(&mp->m_queue); queue_init(&mp->m_queue);
mp->m_owner = NULL; mp->m_owner = NULL;
} }

View File

@ -34,7 +34,7 @@ ReadyList rlist;
*/ */
void chSchInit(void) { void chSchInit(void) {
fifo_init(&rlist.r_queue); queue_init(&rlist.r_queue);
rlist.r_prio = NOPRIO; rlist.r_prio = NOPRIO;
#ifdef CH_USE_ROUNDROBIN #ifdef CH_USE_ROUNDROBIN
rlist.r_preempt = CH_TIME_QUANTUM; rlist.r_preempt = CH_TIME_QUANTUM;

View File

@ -34,7 +34,7 @@
void chSemInit(Semaphore *sp, cnt_t n) { void chSemInit(Semaphore *sp, cnt_t n) {
chDbgAssert(n >= 0, "chsem.c, chSemInit()"); chDbgAssert(n >= 0, "chsem.c, chSemInit()");
fifo_init(&sp->s_queue); queue_init(&sp->s_queue);
sp->s_cnt = n; sp->s_cnt = n;
} }

View File

@ -43,7 +43,7 @@ Thread *init_thread(Thread *tp, tprio_t prio) {
list_init(&tp->p_waiting); list_init(&tp->p_waiting);
#endif #endif
#ifdef CH_USE_MESSAGES #ifdef CH_USE_MESSAGES
fifo_init(&tp->p_msgqueue); queue_init(&tp->p_msgqueue);
#endif #endif
#ifdef CH_USE_EVENTS #ifdef CH_USE_EVENTS
tp->p_epending = 0; tp->p_epending = 0;

View File

@ -53,7 +53,7 @@ typedef struct {
/* /*
* Threads Lists functions and macros. * Threads Lists functions and macros.
*/ */
#define fifo_init(tqp) ((tqp)->p_next = (tqp)->p_prev = (Thread *)(tqp)); #define queue_init(tqp) ((tqp)->p_next = (tqp)->p_prev = (Thread *)(tqp));
#define list_init(tlp) ((tlp)->p_next = (Thread *)(tlp)) #define list_init(tlp) ((tlp)->p_next = (Thread *)(tlp))
#ifndef CH_OPTIMIZE_SPEED #ifndef CH_OPTIMIZE_SPEED