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

This commit is contained in:
gdisirio 2010-01-08 13:37:23 +00:00
parent 1eebe078ff
commit 19aff238cb
4 changed files with 20 additions and 13 deletions

View File

@ -23,8 +23,10 @@
* @details The STM32 support includes: * @details The STM32 support includes:
* - I/O ports driver. * - I/O ports driver.
* - Buffered, interrupt driven, serial 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, ADC driver.
* - DMA capable, high performance, SPI driver.
* - PWM driver.
* - A demo supporting the kernel test suite. * - A demo supporting the kernel test suite.
* - A demo that demonstrate the FatFs use with the MMC driver. * - A demo that demonstrate the FatFs use with the MMC driver.
* . * .

View File

@ -28,12 +28,12 @@
#if !CH_OPTIMIZE_SPEED || defined(__DOXYGEN__) #if !CH_OPTIMIZE_SPEED || defined(__DOXYGEN__)
/** /**
* @brief Inserts a thread into a priority ordered queue. * @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 * @note The insertion is done by scanning the list from the highest priority
* toward the lowest. * toward the lowest.
* @note This function is @b not an API. * @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) { 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. * @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] tp the pointer to the thread to be inserted in the list
* @param[in] tqp the pointer to the threads list header * @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) { 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. * @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 * @param[in] tqp the pointer to the threads list header
* @return The removed thread pointer. * @return The removed thread pointer.
* @note This function is @b not an API.
*/ */
Thread *fifo_remove(ThreadsQueue *tqp) { Thread *fifo_remove(ThreadsQueue *tqp) {
Thread *tp = tqp->p_next; 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. * @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 * @param[in] tqp the pointer to the threads list header
* @return The removed thread pointer. * @return The removed thread pointer.
* @note This function is @b not an API.
*/ */
Thread *lifo_remove(ThreadsQueue *tqp) { 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; return tp;
} }
@ -95,10 +99,10 @@ Thread *lifo_remove(ThreadsQueue *tqp) {
* @brief Removes a Thread from a queue and returns it. * @brief Removes a Thread from a queue and returns it.
* @details The thread is removed from the queue regardless of its relative * @details The thread is removed from the queue regardless of its relative
* position and regardless the used insertion method. * 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 * @param[in] tp the pointer to the thread to be removed from the queue
* @return The removed thread pointer. * @return The removed thread pointer.
* @note This function is @b not an API.
*/ */
Thread *dequeue(Thread *tp) { Thread *dequeue(Thread *tp) {

View File

@ -99,9 +99,9 @@ void chSysInit(void) {
void chSysTimerHandlerI(void) { void chSysTimerHandlerI(void) {
#if CH_TIME_QUANTUM > 0 #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) if (rlist.r_preempt > 0)
/* decrement remaining quantum */ /* Decrement remaining quantum.*/
rlist.r_preempt--; rlist.r_preempt--;
#endif #endif
#if CH_DBG_THREADS_PROFILING #if CH_DBG_THREADS_PROFILING

View File

@ -52,6 +52,7 @@
***************************************************************************** *****************************************************************************
*** 1.3.8 *** *** 1.3.8 ***
- FIX: Fixed dequeuing in lifo_remove() function (bug 2928142).
- FIX: Fixed spurious character generation in MSP430 serial driver (bug - FIX: Fixed spurious character generation in MSP430 serial driver (bug
2926838). 2926838).
- NEW: Introduced an abstract streams interface BaseSequentialStream. - NEW: Introduced an abstract streams interface BaseSequentialStream.