From 1a3658c66a286b112506527a71f9888b9c7e3c98 Mon Sep 17 00:00:00 2001 From: gdisirio Date: Mon, 3 Nov 2008 21:34:42 +0000 Subject: [PATCH] git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@495 35acf78f-673a-0410-8e92-d51de3d6d3f4 --- readme.txt | 2 ++ src/chmtx.c | 2 +- src/chschd.c | 2 +- src/chsem.c | 2 +- src/chthreads.c | 2 +- src/include/lists.h | 2 +- 6 files changed, 7 insertions(+), 5 deletions(-) diff --git a/readme.txt b/readme.txt index 96eb77bdd..3c5edfa75 100644 --- a/readme.txt +++ b/readme.txt @@ -75,6 +75,8 @@ Win32-MinGW - ChibiOS/RT simulator and demo into a WIN32 process, *** 0.7.4 *** - 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 *** - FIX: Fixed a bug in chThdSleepUntil(), this API is no more a macro now. diff --git a/src/chmtx.c b/src/chmtx.c index ea3ccccda..25a490b98 100644 --- a/src/chmtx.c +++ b/src/chmtx.c @@ -32,7 +32,7 @@ */ void chMtxInit(Mutex *mp) { - fifo_init(&mp->m_queue); + queue_init(&mp->m_queue); mp->m_owner = NULL; } diff --git a/src/chschd.c b/src/chschd.c index 573b311ec..52d2b5566 100644 --- a/src/chschd.c +++ b/src/chschd.c @@ -34,7 +34,7 @@ ReadyList rlist; */ void chSchInit(void) { - fifo_init(&rlist.r_queue); + queue_init(&rlist.r_queue); rlist.r_prio = NOPRIO; #ifdef CH_USE_ROUNDROBIN rlist.r_preempt = CH_TIME_QUANTUM; diff --git a/src/chsem.c b/src/chsem.c index 011737642..1ec852a98 100644 --- a/src/chsem.c +++ b/src/chsem.c @@ -34,7 +34,7 @@ void chSemInit(Semaphore *sp, cnt_t n) { chDbgAssert(n >= 0, "chsem.c, chSemInit()"); - fifo_init(&sp->s_queue); + queue_init(&sp->s_queue); sp->s_cnt = n; } diff --git a/src/chthreads.c b/src/chthreads.c index 3f55c4de5..f2afdac89 100644 --- a/src/chthreads.c +++ b/src/chthreads.c @@ -43,7 +43,7 @@ Thread *init_thread(Thread *tp, tprio_t prio) { list_init(&tp->p_waiting); #endif #ifdef CH_USE_MESSAGES - fifo_init(&tp->p_msgqueue); + queue_init(&tp->p_msgqueue); #endif #ifdef CH_USE_EVENTS tp->p_epending = 0; diff --git a/src/include/lists.h b/src/include/lists.h index 2f4324b71..785d3b013 100644 --- a/src/include/lists.h +++ b/src/include/lists.h @@ -53,7 +53,7 @@ typedef struct { /* * 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)) #ifndef CH_OPTIMIZE_SPEED