From 1ea7355d85e316aadfd90468b3e808bb3dc95ee9 Mon Sep 17 00:00:00 2001 From: gdisirio Date: Sun, 16 Aug 2009 13:07:24 +0000 Subject: git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@1073 35acf78f-673a-0410-8e92-d51de3d6d3f4 --- os/kernel/src/chlists.c | 111 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 111 insertions(+) create mode 100644 os/kernel/src/chlists.c (limited to 'os/kernel/src/chlists.c') diff --git a/os/kernel/src/chlists.c b/os/kernel/src/chlists.c new file mode 100644 index 000000000..a2177ca63 --- /dev/null +++ b/os/kernel/src/chlists.c @@ -0,0 +1,111 @@ +/* + ChibiOS/RT - Copyright (C) 2006-2007 Giovanni Di Sirio. + + This file is part of ChibiOS/RT. + + ChibiOS/RT is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + ChibiOS/RT is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . +*/ + +/** + * @file chlists.c + * @brief Thread queues/lists code. + * @addtogroup ThreadLists + * @{ + */ +#include + +#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. + */ +void prio_insert(Thread *tp, ThreadsQueue *tqp) { + + /* cp iterates over the queue */ + Thread *cp = (Thread *)tqp; + do { + /* iterate to next thread in queue */ + cp = cp->p_next; + /* 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 */ + tp->p_prev = (tp->p_next = cp)->p_prev; + /* 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. + * + * @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) { + + tp->p_prev = (tp->p_next = (Thread *)tqp)->p_prev; + tp->p_prev->p_next = tqp->p_prev = tp; +} + +/** + * @brief Removes the first-out Thread from a queue and returns it. + * + * @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; + + (tqp->p_next = tp->p_next)->p_prev = (Thread *)tqp; + return tp; +} + +/** + * @brief Removes the last-out Thread from a queue and returns it. + * + * @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; + + (tqp->p_next = tp->p_next)->p_prev = (Thread *)tqp; + return tp; +} + +/** + * @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. + * + * @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) { + + tp->p_prev->p_next = tp->p_next; + tp->p_next->p_prev = tp->p_prev; + return tp; +} +#endif /* CH_OPTIMIZE_SPEED */ + +/** @} */ -- cgit v1.2.3 From 397ccffac55ffd139d0e3e82add83e51413c1347 Mon Sep 17 00:00:00 2001 From: gdisirio Date: Sun, 30 Aug 2009 06:59:43 +0000 Subject: Documentation reorganization. git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@1133 35acf78f-673a-0410-8e92-d51de3d6d3f4 --- os/kernel/src/chlists.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'os/kernel/src/chlists.c') diff --git a/os/kernel/src/chlists.c b/os/kernel/src/chlists.c index a2177ca63..5c5d90869 100644 --- a/os/kernel/src/chlists.c +++ b/os/kernel/src/chlists.c @@ -20,7 +20,7 @@ /** * @file chlists.c * @brief Thread queues/lists code. - * @addtogroup ThreadLists + * @addtogroup internals * @{ */ #include -- cgit v1.2.3 From bdb7f4ab20bd3daf261ab93dfe733e0ff11dca0f Mon Sep 17 00:00:00 2001 From: gdisirio Date: Tue, 8 Dec 2009 17:37:49 +0000 Subject: git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@1397 35acf78f-673a-0410-8e92-d51de3d6d3f4 --- os/kernel/src/chlists.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'os/kernel/src/chlists.c') diff --git a/os/kernel/src/chlists.c b/os/kernel/src/chlists.c index 5c5d90869..da48b678e 100644 --- a/os/kernel/src/chlists.c +++ b/os/kernel/src/chlists.c @@ -23,7 +23,7 @@ * @addtogroup internals * @{ */ -#include +#include "ch.h" #if !CH_OPTIMIZE_SPEED || defined(__DOXYGEN__) /** -- cgit v1.2.3 From 19aff238cb04c02491e65f391f2fcceb09da4dd5 Mon Sep 17 00:00:00 2001 From: gdisirio Date: Fri, 8 Jan 2010 13:37:23 +0000 Subject: git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@1510 35acf78f-673a-0410-8e92-d51de3d6d3f4 --- os/kernel/src/chlists.c | 22 +++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-) (limited to 'os/kernel/src/chlists.c') 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) { -- cgit v1.2.3 From 7f8dfe2fd3e770c2e0435e9c56f5db5fd11ed6f7 Mon Sep 17 00:00:00 2001 From: gdisirio Date: Sun, 31 Jan 2010 09:27:49 +0000 Subject: Implemented thread reference counters and related APIs. git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@1556 35acf78f-673a-0410-8e92-d51de3d6d3f4 --- os/kernel/src/chlists.c | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) (limited to 'os/kernel/src/chlists.c') diff --git a/os/kernel/src/chlists.c b/os/kernel/src/chlists.c index 4b87105bc..53f91649a 100644 --- a/os/kernel/src/chlists.c +++ b/os/kernel/src/chlists.c @@ -110,6 +110,34 @@ Thread *dequeue(Thread *tp) { tp->p_next->p_prev = tp->p_prev; return tp; } + +/** + * @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 + */ +void list_insert(Thread *tp, ThreadsList *tlp) { + + tp->p_next = tlp->p_next; + tlp->p_next = tp; +} + +/** + * @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. + */ +Thread *list_remove(ThreadsList *tlp) { + + Thread *tp = tlp->p_next; + tlp->p_next = tp->p_next; + return tp; +} #endif /* CH_OPTIMIZE_SPEED */ /** @} */ -- cgit v1.2.3 From f17db1931e95f5ebb42f557b6eead2bf1320db5a Mon Sep 17 00:00:00 2001 From: gdisirio Date: Sat, 6 Feb 2010 10:55:53 +0000 Subject: 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 --- os/kernel/src/chlists.c | 85 +++++++++++++++++++++++++------------------------ 1 file changed, 43 insertions(+), 42 deletions(-) (limited to 'os/kernel/src/chlists.c') 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) { -- cgit v1.2.3 From 8e428dbd1a48615c36c8c086dd51079050c9fb1c Mon Sep 17 00:00:00 2001 From: gdisirio Date: Sat, 6 Feb 2010 12:31:09 +0000 Subject: Kernel headers cleanup. git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@1568 35acf78f-673a-0410-8e92-d51de3d6d3f4 --- os/kernel/src/chlists.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'os/kernel/src/chlists.c') diff --git a/os/kernel/src/chlists.c b/os/kernel/src/chlists.c index 2aeb55ecb..9b309ceea 100644 --- a/os/kernel/src/chlists.c +++ b/os/kernel/src/chlists.c @@ -20,6 +20,9 @@ /** * @file chlists.c * @brief Thread queues/lists code. + * @note All the functions present in this module, while public, are not + * an OS API and should not be directly used in the user applications + * code. * * @addtogroup internals * @{ -- cgit v1.2.3 From 157b6f9695e7f72f2d54b231c19cb4045710ed01 Mon Sep 17 00:00:00 2001 From: gdisirio Date: Sun, 21 Feb 2010 07:24:53 +0000 Subject: Updated license dates. git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@1646 35acf78f-673a-0410-8e92-d51de3d6d3f4 --- os/kernel/src/chlists.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'os/kernel/src/chlists.c') diff --git a/os/kernel/src/chlists.c b/os/kernel/src/chlists.c index 9b309ceea..f722f94cb 100644 --- a/os/kernel/src/chlists.c +++ b/os/kernel/src/chlists.c @@ -1,5 +1,5 @@ /* - ChibiOS/RT - Copyright (C) 2006-2007 Giovanni Di Sirio. + ChibiOS/RT - Copyright (C) 2006,2007,2008,2009,2010 Giovanni Di Sirio. This file is part of ChibiOS/RT. -- cgit v1.2.3 From ad3d21e81592481539a56e93234f5bf1fa2c0504 Mon Sep 17 00:00:00 2001 From: gdisirio Date: Tue, 16 Mar 2010 19:36:21 +0000 Subject: Documentation reorganization. Moved the description from kernel.dox into the source code for ease of editing and reference. git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@1746 35acf78f-673a-0410-8e92-d51de3d6d3f4 --- os/kernel/src/chlists.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'os/kernel/src/chlists.c') diff --git a/os/kernel/src/chlists.c b/os/kernel/src/chlists.c index f722f94cb..2d973e771 100644 --- a/os/kernel/src/chlists.c +++ b/os/kernel/src/chlists.c @@ -20,11 +20,11 @@ /** * @file chlists.c * @brief Thread queues/lists code. - * @note All the functions present in this module, while public, are not - * an OS API and should not be directly used in the user applications - * code. * * @addtogroup internals + * @details All the functions present in this module, while public, are not + * an OS API and should not be directly used in the user applications + * code. * @{ */ #include "ch.h" -- cgit v1.2.3 From 0ea17958535e56f50064ae47a50a3cd742f88163 Mon Sep 17 00:00:00 2001 From: gdisirio Date: Sun, 29 Aug 2010 06:29:01 +0000 Subject: Fixed bug 3055329. git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@2139 35acf78f-673a-0410-8e92-d51de3d6d3f4 --- os/kernel/src/chlists.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'os/kernel/src/chlists.c') diff --git a/os/kernel/src/chlists.c b/os/kernel/src/chlists.c index 2d973e771..83bdf8b35 100644 --- a/os/kernel/src/chlists.c +++ b/os/kernel/src/chlists.c @@ -48,9 +48,9 @@ void prio_insert(Thread *tp, ThreadsQueue *tqp) { cp = cp->p_next; /* 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.*/ - tp->p_prev = (tp->p_next = cp)->p_prev; - /* Make prev point to tp, and cp point back to tp.*/ + /* Insertion on p_prev.*/ + tp->p_next = cp; + tp->p_prev = cp->p_prev; tp->p_prev->p_next = cp->p_prev = tp; } @@ -63,7 +63,8 @@ void prio_insert(Thread *tp, ThreadsQueue *tqp) { */ void queue_insert(Thread *tp, ThreadsQueue *tqp) { - tp->p_prev = (tp->p_next = (Thread *)tqp)->p_prev; + tp->p_next = (Thread *)tqp; + tp->p_prev = tqp->p_prev; tp->p_prev->p_next = tqp->p_prev = tp; } -- cgit v1.2.3 From 07351222e6d0b6b3dcd4f50ecb18bc09e7402d1c Mon Sep 17 00:00:00 2001 From: gdisirio Date: Tue, 21 Sep 2010 10:22:06 +0000 Subject: git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@2184 35acf78f-673a-0410-8e92-d51de3d6d3f4 --- os/kernel/src/chlists.c | 29 ++++++++++++++++++----------- 1 file changed, 18 insertions(+), 11 deletions(-) (limited to 'os/kernel/src/chlists.c') diff --git a/os/kernel/src/chlists.c b/os/kernel/src/chlists.c index 83bdf8b35..878f1360c 100644 --- a/os/kernel/src/chlists.c +++ b/os/kernel/src/chlists.c @@ -23,7 +23,7 @@ * * @addtogroup internals * @details All the functions present in this module, while public, are not - * an OS API and should not be directly used in the user applications + * OS APIs and should not be directly used in the user applications * code. * @{ */ @@ -32,12 +32,13 @@ #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. + * @note The insertion is done by scanning the list from the highest + * priority toward the lowest. * * @param[in] tp the pointer to the thread to be inserted in the list * @param[in] tqp the pointer to the threads list header + * + * @notapi */ void prio_insert(Thread *tp, ThreadsQueue *tqp) { @@ -56,10 +57,11 @@ 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 + * + * @notapi */ void queue_insert(Thread *tp, ThreadsQueue *tqp) { @@ -72,10 +74,11 @@ 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. + * + * @notapi */ Thread *fifo_remove(ThreadsQueue *tqp) { Thread *tp = tqp->p_next; @@ -88,10 +91,11 @@ 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. + * + * @notapi */ Thread *lifo_remove(ThreadsQueue *tqp) { Thread *tp = tqp->p_prev; @@ -104,10 +108,11 @@ 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. + * + * @notapi */ Thread *dequeue(Thread *tp) { @@ -118,10 +123,11 @@ Thread *dequeue(Thread *tp) { /** * @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 + * + * @notapi */ void list_insert(Thread *tp, ThreadsList *tlp) { @@ -131,11 +137,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. + * @pre The list must be non-empty before calling this function. * * @param[in] tlp the pointer to the threads list header * @return The removed thread pointer. + * + * @notapi */ Thread *list_remove(ThreadsList *tlp) { -- cgit v1.2.3 From e7e79a6ccb4f3e320b2b8b7bad1b14d65218641d Mon Sep 17 00:00:00 2001 From: gdisirio Date: Fri, 18 Mar 2011 18:38:08 +0000 Subject: License updated. git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@2827 35acf78f-673a-0410-8e92-d51de3d6d3f4 --- os/kernel/src/chlists.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'os/kernel/src/chlists.c') diff --git a/os/kernel/src/chlists.c b/os/kernel/src/chlists.c index 878f1360c..c3168eafe 100644 --- a/os/kernel/src/chlists.c +++ b/os/kernel/src/chlists.c @@ -1,5 +1,6 @@ /* - ChibiOS/RT - Copyright (C) 2006,2007,2008,2009,2010 Giovanni Di Sirio. + ChibiOS/RT - Copyright (C) 2006,2007,2008,2009,2010, + 2011 Giovanni Di Sirio. This file is part of ChibiOS/RT. -- cgit v1.2.3 From de5dcbba856524599a8f06d3a9bdbf1b01db44c2 Mon Sep 17 00:00:00 2001 From: gdisirio Date: Sat, 21 Jan 2012 14:29:42 +0000 Subject: License text updated with new year. git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@3846 35acf78f-673a-0410-8e92-d51de3d6d3f4 --- os/kernel/src/chlists.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'os/kernel/src/chlists.c') diff --git a/os/kernel/src/chlists.c b/os/kernel/src/chlists.c index c3168eafe..b7821493e 100644 --- a/os/kernel/src/chlists.c +++ b/os/kernel/src/chlists.c @@ -1,6 +1,6 @@ /* ChibiOS/RT - Copyright (C) 2006,2007,2008,2009,2010, - 2011 Giovanni Di Sirio. + 2011,2012 Giovanni Di Sirio. This file is part of ChibiOS/RT. -- cgit v1.2.3 From 184a71345c6a36a9a8664eda8fbcc3ea728267a8 Mon Sep 17 00:00:00 2001 From: gdisirio Date: Sat, 2 Feb 2013 10:58:09 +0000 Subject: Updated license years. git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@5102 35acf78f-673a-0410-8e92-d51de3d6d3f4 --- os/kernel/src/chlists.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'os/kernel/src/chlists.c') diff --git a/os/kernel/src/chlists.c b/os/kernel/src/chlists.c index b7821493e..8ee309200 100644 --- a/os/kernel/src/chlists.c +++ b/os/kernel/src/chlists.c @@ -1,6 +1,6 @@ /* ChibiOS/RT - Copyright (C) 2006,2007,2008,2009,2010, - 2011,2012 Giovanni Di Sirio. + 2011,2012,2013 Giovanni Di Sirio. This file is part of ChibiOS/RT. -- cgit v1.2.3