diff options
author | gdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4> | 2014-12-11 15:12:21 +0000 |
---|---|---|
committer | gdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4> | 2014-12-11 15:12:21 +0000 |
commit | 055fea386e4994a35b758b94f948f9de1c8ba091 (patch) | |
tree | b121874ef43c137a308d7009c7acc08b43c0b135 /os/rt/include/chschd.h | |
parent | 509af41c04084bb0ed467d137efb4aeb68d25a05 (diff) | |
download | ChibiOS-055fea386e4994a35b758b94f948f9de1c8ba091.tar.gz ChibiOS-055fea386e4994a35b758b94f948f9de1c8ba091.tar.bz2 ChibiOS-055fea386e4994a35b758b94f948f9de1c8ba091.zip |
Documentation related fixes. Documentation is buildable with Doxygen 1.8.8 now.
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@7571 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'os/rt/include/chschd.h')
-rw-r--r-- | os/rt/include/chschd.h | 252 |
1 files changed, 138 insertions, 114 deletions
diff --git a/os/rt/include/chschd.h b/os/rt/include/chschd.h index f2deb3b92..3b17a417e 100644 --- a/os/rt/include/chschd.h +++ b/os/rt/include/chschd.h @@ -416,120 +416,136 @@ extern "C" { /* Module inline functions. */
/*===========================================================================*/
- /**
- * @brief Threads list initialization.
- *
- * @notapi
- */
- static inline void list_init(threads_list_t *tlp) {
-
- tlp->p_next = (thread_t *)tlp;
- }
-
- /**
- * @brief Evaluates to @p true if the specified threads list is empty.
- *
- * @notapi
- */
- static inline bool list_isempty(threads_list_t *tlp) {
-
- return (bool)(tlp->p_next == (thread_t *)tlp);
- }
-
- /**
- * @brief Evaluates to @p true if the specified threads list is not empty.
- *
- * @notapi
- */
- static inline bool list_notempty(threads_list_t *tlp) {
-
- return (bool)(tlp->p_next != (thread_t *)tlp);
- }
-
- /**
- * @brief Threads queue initialization.
- *
- * @notapi
- */
- static inline void queue_init(threads_queue_t *tqp) {
-
- tqp->p_next = tqp->p_prev = (thread_t *)tqp;
- }
-
- /**
- * @brief Evaluates to @p true if the specified threads queue is empty.
- *
- * @notapi
- */
- static inline bool queue_isempty(threads_queue_t *tqp) {
-
- return (bool)(tqp->p_next == (thread_t *)tqp);
- }
-
- /**
- * @brief Evaluates to @p true if the specified threads queue is not empty.
- *
- * @notapi
- */
- static inline bool queue_notempty(threads_queue_t *tqp) {
-
- return (bool)(tqp->p_next != (thread_t *)tqp);
- }
-
- /* If the performance code path has been chosen then all the following
- functions are inlined into the various kernel modules.*/
- #if CH_CFG_OPTIMIZE_SPEED
- static inline void list_insert(thread_t *tp, threads_list_t *tlp) {
-
- tp->p_next = tlp->p_next;
- tlp->p_next = tp;
- }
-
- static inline thread_t *list_remove(threads_list_t *tlp) {
-
- thread_t *tp = tlp->p_next;
- tlp->p_next = tp->p_next;
- return tp;
- }
-
- static inline void queue_prio_insert(thread_t *tp, threads_queue_t *tqp) {
-
- thread_t *cp = (thread_t *)tqp;
- do {
- cp = cp->p_next;
- } while ((cp != (thread_t *)tqp) && (cp->p_prio >= tp->p_prio));
- tp->p_next = cp;
- tp->p_prev = cp->p_prev;
- tp->p_prev->p_next = cp->p_prev = tp;
- }
-
- static inline void queue_insert(thread_t *tp, threads_queue_t *tqp) {
-
- tp->p_next = (thread_t *)tqp;
- tp->p_prev = tqp->p_prev;
- tp->p_prev->p_next = tqp->p_prev = tp;
- }
-
- static inline thread_t *queue_fifo_remove(threads_queue_t *tqp) {
- thread_t *tp = tqp->p_next;
-
- (tqp->p_next = tp->p_next)->p_prev = (thread_t *)tqp;
- return tp;
- }
-
- static inline thread_t *queue_lifo_remove(threads_queue_t *tqp) {
- thread_t *tp = tqp->p_prev;
-
- (tqp->p_prev = tp->p_prev)->p_next = (thread_t *)tqp;
- return tp;
- }
-
- static inline thread_t *queue_dequeue(thread_t *tp) {
-
- tp->p_prev->p_next = tp->p_next;
- tp->p_next->p_prev = tp->p_prev;
- return tp;
- }
+/**
+ * @brief Threads list initialization.
+ *
+ * @param[in] tlp pointer to the threads list object
+ *
+ * @notapi
+ */
+static inline void list_init(threads_list_t *tlp) {
+
+ tlp->p_next = (thread_t *)tlp;
+}
+
+/**
+ * @brief Evaluates to @p true if the specified threads list is empty.
+ *
+ * @param[in] tlp pointer to the threads list object
+ * @return The status of the list.
+ *
+ * @notapi
+ */
+static inline bool list_isempty(threads_list_t *tlp) {
+
+ return (bool)(tlp->p_next == (thread_t *)tlp);
+}
+
+/**
+ * @brief Evaluates to @p true if the specified threads list is not empty.
+ *
+ * @param[in] tlp pointer to the threads list object
+ * @return The status of the list.
+ *
+ * @notapi
+ */
+static inline bool list_notempty(threads_list_t *tlp) {
+
+ return (bool)(tlp->p_next != (thread_t *)tlp);
+}
+
+/**
+ * @brief Threads queue initialization.
+ *
+ * @param[in] tqp pointer to the threads queue object
+ *
+ * @notapi
+ */
+static inline void queue_init(threads_queue_t *tqp) {
+
+ tqp->p_next = tqp->p_prev = (thread_t *)tqp;
+}
+
+/**
+ * @brief Evaluates to @p true if the specified threads queue is empty.
+ *
+ * @param[in] tqp pointer to the threads queue object
+ * @return The status of the queue.
+ *
+ * @notapi
+ */
+static inline bool queue_isempty(threads_queue_t *tqp) {
+
+ return (bool)(tqp->p_next == (thread_t *)tqp);
+}
+
+/**
+ * @brief Evaluates to @p true if the specified threads queue is not empty.
+ *
+ * @param[in] tqp pointer to the threads queue object
+ * @return The status of the queue.
+ *
+ * @notapi
+ */
+static inline bool queue_notempty(threads_queue_t *tqp) {
+
+ return (bool)(tqp->p_next != (thread_t *)tqp);
+}
+
+/* If the performance code path has been chosen then all the following
+ functions are inlined into the various kernel modules.*/
+#if CH_CFG_OPTIMIZE_SPEED
+static inline void list_insert(thread_t *tp, threads_list_t *tlp) {
+
+ tp->p_next = tlp->p_next;
+ tlp->p_next = tp;
+}
+
+static inline thread_t *list_remove(threads_list_t *tlp) {
+
+ thread_t *tp = tlp->p_next;
+ tlp->p_next = tp->p_next;
+ return tp;
+}
+
+static inline void queue_prio_insert(thread_t *tp, threads_queue_t *tqp) {
+
+ thread_t *cp = (thread_t *)tqp;
+ do {
+ cp = cp->p_next;
+ } while ((cp != (thread_t *)tqp) && (cp->p_prio >= tp->p_prio));
+ tp->p_next = cp;
+ tp->p_prev = cp->p_prev;
+ tp->p_prev->p_next = cp->p_prev = tp;
+}
+
+static inline void queue_insert(thread_t *tp, threads_queue_t *tqp) {
+
+ tp->p_next = (thread_t *)tqp;
+ tp->p_prev = tqp->p_prev;
+ tp->p_prev->p_next = tqp->p_prev = tp;
+}
+
+static inline thread_t *queue_fifo_remove(threads_queue_t *tqp) {
+ thread_t *tp = tqp->p_next;
+
+ (tqp->p_next = tp->p_next)->p_prev = (thread_t *)tqp;
+ return tp;
+}
+
+static inline thread_t *queue_lifo_remove(threads_queue_t *tqp) {
+ thread_t *tp = tqp->p_prev;
+
+ (tqp->p_prev = tp->p_prev)->p_next = (thread_t *)tqp;
+ return tp;
+}
+
+static inline thread_t *queue_dequeue(thread_t *tp) {
+
+ tp->p_prev->p_next = tp->p_next;
+ tp->p_next->p_prev = tp->p_prev;
+ return tp;
+}
#endif /* CH_CFG_OPTIMIZE_SPEED */
/**
@@ -537,6 +553,10 @@ extern "C" { * @details This function returns @p true if there is a ready thread with
* higher priority.
*
+ * @return The priorities situation.
+ * @retval false if rescheduling is not necessary.
+ * @retval true if there is a ready thread at higher priority.
+ *
* @iclass
*/
static inline bool chSchIsRescRequiredI(void) {
@@ -551,6 +571,10 @@ static inline bool chSchIsRescRequiredI(void) { * @details This function returns @p true if there is a ready thread with
* equal or higher priority.
*
+ * @return The priorities situation.
+ * @retval false if yielding is not possible.
+ * @retval true if there is a ready thread at equal or higher priority.
+ *
* @sclass
*/
static inline bool chSchCanYieldS(void) {
|