diff options
author | gdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4> | 2010-01-08 13:37:23 +0000 |
---|---|---|
committer | gdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4> | 2010-01-08 13:37:23 +0000 |
commit | 19aff238cb04c02491e65f391f2fcceb09da4dd5 (patch) | |
tree | e82f9c91ff9f8d23390d3046d363d4d9fdc7853f | |
parent | 1eebe078ffbb85c3fb8a14db4d241502b27145bf (diff) | |
download | ChibiOS-19aff238cb04c02491e65f391f2fcceb09da4dd5.tar.gz ChibiOS-19aff238cb04c02491e65f391f2fcceb09da4dd5.tar.bz2 ChibiOS-19aff238cb04c02491e65f391f2fcceb09da4dd5.zip |
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@1510 35acf78f-673a-0410-8e92-d51de3d6d3f4
-rw-r--r-- | os/hal/platforms/STM32/platform.dox | 6 | ||||
-rw-r--r-- | os/kernel/src/chlists.c | 22 | ||||
-rw-r--r-- | os/kernel/src/chsys.c | 4 | ||||
-rw-r--r-- | readme.txt | 1 |
4 files changed, 20 insertions, 13 deletions
diff --git a/os/hal/platforms/STM32/platform.dox b/os/hal/platforms/STM32/platform.dox index e243f870c..6cf743df8 100644 --- a/os/hal/platforms/STM32/platform.dox +++ b/os/hal/platforms/STM32/platform.dox @@ -23,8 +23,10 @@ * @details The STM32 support includes:
* - I/O ports driver.
* - Buffered, interrupt driven, serial driver.
- * - DMA capable, high performance, SPI driver.
+ * - Interrupt driver CAN driver.
* - DMA capable, high performance, ADC driver.
+ * - DMA capable, high performance, SPI driver.
+ * - PWM driver.
* - A demo supporting the kernel test suite.
* - A demo that demonstrate the FatFs use with the MMC driver.
* .
@@ -124,4 +126,4 @@ *
* @ingroup STM32
*/
-
\ No newline at end of file +
diff --git a/os/kernel/src/chlists.c b/os/kernel/src/chlists.c index da48b678e..4b87105bc 100644 --- a/os/kernel/src/chlists.c +++ b/os/kernel/src/chlists.c @@ -28,12 +28,12 @@ #if !CH_OPTIMIZE_SPEED || defined(__DOXYGEN__)
/**
* @brief Inserts a thread into a priority ordered queue.
- *
- * @param[in] tp the pointer to the thread to be inserted in the list
- * @param[in] tqp the pointer to the threads list header
* @note The insertion is done by scanning the list from the highest priority
* toward the lowest.
* @note This function is @b not an API.
+ *
+ * @param[in] tp the pointer to the thread to be inserted in the list
+ * @param[in] tqp the pointer to the threads list header
*/
void prio_insert(Thread *tp, ThreadsQueue *tqp) {
@@ -52,10 +52,10 @@ void prio_insert(Thread *tp, ThreadsQueue *tqp) { /**
* @brief Inserts a Thread into a queue.
+ * @note This function is @b not an API.
*
* @param[in] tp the pointer to the thread to be inserted in the list
* @param[in] tqp the pointer to the threads list header
- * @note This function is @b not an API.
*/
void queue_insert(Thread *tp, ThreadsQueue *tqp) {
@@ -65,10 +65,12 @@ void queue_insert(Thread *tp, ThreadsQueue *tqp) { /**
* @brief Removes the first-out Thread from a queue and returns it.
+ * @note If the queue is priority ordered then this function returns the
+ * thread with the highest priority.
+ * @note This function is @b not an API.
*
* @param[in] tqp the pointer to the threads list header
* @return The removed thread pointer.
- * @note This function is @b not an API.
*/
Thread *fifo_remove(ThreadsQueue *tqp) {
Thread *tp = tqp->p_next;
@@ -79,15 +81,17 @@ Thread *fifo_remove(ThreadsQueue *tqp) { /**
* @brief Removes the last-out Thread from a queue and returns it.
+ * @note If the queue is priority ordered then this function returns the
+ * thread with the lowest priority.
+ * @note This function is @b not an API.
*
* @param[in] tqp the pointer to the threads list header
* @return The removed thread pointer.
- * @note This function is @b not an API.
*/
Thread *lifo_remove(ThreadsQueue *tqp) {
- Thread *tp = tqp->p_next;
+ Thread *tp = tqp->p_prev;
- (tqp->p_next = tp->p_next)->p_prev = (Thread *)tqp;
+ (tqp->p_prev = tp->p_prev)->p_next = (Thread *)tqp;
return tp;
}
@@ -95,10 +99,10 @@ Thread *lifo_remove(ThreadsQueue *tqp) { * @brief Removes a Thread from a queue and returns it.
* @details The thread is removed from the queue regardless of its relative
* position and regardless the used insertion method.
+ * @note This function is @b not an API.
*
* @param[in] tp the pointer to the thread to be removed from the queue
* @return The removed thread pointer.
- * @note This function is @b not an API.
*/
Thread *dequeue(Thread *tp) {
diff --git a/os/kernel/src/chsys.c b/os/kernel/src/chsys.c index 29c225b4c..74ee794a3 100644 --- a/os/kernel/src/chsys.c +++ b/os/kernel/src/chsys.c @@ -99,9 +99,9 @@ void chSysInit(void) { void chSysTimerHandlerI(void) { #if CH_TIME_QUANTUM > 0 - /* running thread has not used up quantum yet? */ + /* Running thread has not used up quantum yet? */ if (rlist.r_preempt > 0) - /* decrement remaining quantum */ + /* Decrement remaining quantum.*/ rlist.r_preempt--; #endif #if CH_DBG_THREADS_PROFILING diff --git a/readme.txt b/readme.txt index b91f389cf..dca9c5c04 100644 --- a/readme.txt +++ b/readme.txt @@ -52,6 +52,7 @@ *****************************************************************************
*** 1.3.8 ***
+- FIX: Fixed dequeuing in lifo_remove() function (bug 2928142).
- FIX: Fixed spurious character generation in MSP430 serial driver (bug
2926838).
- NEW: Introduced an abstract streams interface BaseSequentialStream.
|