diff options
author | gdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4> | 2010-02-06 10:55:53 +0000 |
---|---|---|
committer | gdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4> | 2010-02-06 10:55:53 +0000 |
commit | f17db1931e95f5ebb42f557b6eead2bf1320db5a (patch) | |
tree | 0676532b6f3231f6c7343b3f644cdc5282433090 /os/kernel/src/chlists.c | |
parent | 6f7c30adff593e365515898082436f893f2ccb00 (diff) | |
download | ChibiOS-f17db1931e95f5ebb42f557b6eead2bf1320db5a.tar.gz ChibiOS-f17db1931e95f5ebb42f557b6eead2bf1320db5a.tar.bz2 ChibiOS-f17db1931e95f5ebb42f557b6eead2bf1320db5a.zip |
Reformatted doxygen tags into the kernel sources to make them more readable.
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@1567 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'os/kernel/src/chlists.c')
-rw-r--r-- | os/kernel/src/chlists.c | 85 |
1 files changed, 43 insertions, 42 deletions
diff --git a/os/kernel/src/chlists.c b/os/kernel/src/chlists.c index 53f91649a..2aeb55ecb 100644 --- a/os/kernel/src/chlists.c +++ b/os/kernel/src/chlists.c @@ -18,8 +18,9 @@ */
/**
- * @file chlists.c
- * @brief Thread queues/lists code.
+ * @file chlists.c
+ * @brief Thread queues/lists code.
+ *
* @addtogroup internals
* @{
*/
@@ -27,35 +28,35 @@ #if !CH_OPTIMIZE_SPEED || defined(__DOXYGEN__)
/**
- * @brief Inserts a thread into a priority ordered queue.
- * @note The insertion is done by scanning the list from the highest priority
- * toward the lowest.
- * @note This function is @b not an API.
+ * @brief Inserts a thread into a priority ordered queue.
+ * @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
+ * @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) {
- /* cp iterates over the queue */
+ /* cp iterates over the queue.*/
Thread *cp = (Thread *)tqp;
do {
- /* iterate to next thread in queue */
+ /* Iterate to next thread in queue.*/
cp = cp->p_next;
- /* not end of queue? and cp has equal or higher priority than tp? */
+ /* Not end of queue? and cp has equal or higher priority than tp?.*/
} while ((cp != (Thread *)tqp) && (cp->p_prio >= tp->p_prio));
- /* insert before cp, point tp to next and prev in queue */
+ /* Insert before cp, point tp to next and prev in queue.*/
tp->p_prev = (tp->p_next = cp)->p_prev;
- /* make prev point to tp, and cp point back to tp */
+ /* Make prev point to tp, and cp point back to tp.*/
tp->p_prev->p_next = cp->p_prev = tp;
}
/**
- * @brief Inserts a Thread into a queue.
- * @note This function is @b not an API.
+ * @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
+ * @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 queue_insert(Thread *tp, ThreadsQueue *tqp) {
@@ -64,13 +65,13 @@ 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.
+ * @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.
+ * @param[in] tqp the pointer to the threads list header
+ * @return The removed thread pointer.
*/
Thread *fifo_remove(ThreadsQueue *tqp) {
Thread *tp = tqp->p_next;
@@ -80,13 +81,13 @@ 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.
+ * @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.
+ * @param[in] tqp the pointer to the threads list header
+ * @return The removed thread pointer.
*/
Thread *lifo_remove(ThreadsQueue *tqp) {
Thread *tp = tqp->p_prev;
@@ -96,13 +97,13 @@ 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
* position and regardless the used insertion method.
- * @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 removed from the queue
- * @return The removed thread pointer.
+ * @param[in] tp the pointer to the thread to be removed from the queue
+ * @return The removed thread pointer.
*/
Thread *dequeue(Thread *tp) {
@@ -112,11 +113,11 @@ Thread *dequeue(Thread *tp) { }
/**
- * @brief Pushes a Thread on top of a stack list.
- * @note This function is @b not an API.
+ * @brief Pushes a Thread on top of a stack list.
+ * @note This function is @b not an API.
*
- * @param[in] tp the pointer to the thread to be inserted in the list
- * @param[in] tlp the pointer to the threads list header
+ * @param[in] tp the pointer to the thread to be inserted in the list
+ * @param[in] tlp the pointer to the threads list header
*/
void list_insert(Thread *tp, ThreadsList *tlp) {
@@ -125,12 +126,12 @@ void list_insert(Thread *tp, ThreadsList *tlp) { }
/**
- * @brief Pops a Thread from the top of a stack list and returns it.
- * @note The list must be non-empty before calling this function.
- * @note This function is @b not an API.
+ * @brief Pops a Thread from the top of a stack list and returns it.
+ * @note The list must be non-empty before calling this function.
+ * @note This function is @b not an API.
*
- * @param[in] tlp the pointer to the threads list header
- * @return The removed thread pointer.
+ * @param[in] tlp the pointer to the threads list header
+ * @return The removed thread pointer.
*/
Thread *list_remove(ThreadsList *tlp) {
|