You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mynewt.apache.org by ja...@apache.org on 2024/06/28 07:01:41 UTC
(mynewt-core) branch master updated (c102ed4a0 -> 0b2a79cb3)
This is an automated email from the ASF dual-hosted git repository.
janc pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/mynewt-core.git
from c102ed4a0 kernel/os_cputime: Remove doxygen comments from the source file
new 09d893657 kernel/os_callout: Add parameter names
new 09519726c kernel/os_callout: Update doxygen comments in the header file
new 0b2a79cb3 kernel/os_callout: Remove doxygen comments from the source file
The 3 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
Summary of changes:
kernel/os/include/os/os_callout.h | 59 +++++++++++++++++++++++++--------------
kernel/os/src/os_callout.c | 14 ----------
2 files changed, 38 insertions(+), 35 deletions(-)
(mynewt-core) 02/03: kernel/os_callout: Update doxygen comments in the header file
Posted by ja...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
janc pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/mynewt-core.git
commit 09519726c09e62f2026cf19c21e4af9785eedd41
Author: Wojciech Pietraszewski <wo...@codecoup.pl>
AuthorDate: Thu Jun 27 16:18:12 2024 +0200
kernel/os_callout: Update doxygen comments in the header file
Amends the documentation for functions and structures.
Adjusts the formatting for better readability.
---
kernel/os/include/os/os_callout.h | 36 +++++++++++++++++++-----------------
1 file changed, 19 insertions(+), 17 deletions(-)
diff --git a/kernel/os/include/os/os_callout.h b/kernel/os/include/os/os_callout.h
index 946dcfba4..2002de734 100644
--- a/kernel/os/include/os/os_callout.h
+++ b/kernel/os/include/os/os_callout.h
@@ -46,7 +46,7 @@ struct os_callout {
/** Number of ticks in the future to expire the callout */
os_time_t c_ticks;
-
+ /** Next callout in the list */
TAILQ_ENTRY(os_callout) c_next;
};
@@ -69,13 +69,13 @@ TAILQ_HEAD(os_callout_list, os_callout);
* queue specified in os_callout_init(). The event argument given here
* is posted in the ev_arg field of that event.
*
- * @param c The callout to initialize
- * @param evq The event queue to post an OS_EVENT_T_TIMER event to
- * @param timo_func The function to call on this callout for the host task
- * used to provide multiple timer events to a task
- * (this can be NULL.)
- * @param ev_arg The argument to provide to the event when posting the
- * timer.
+ * @param c The callout to initialize
+ * @param evq The event queue to post an OS_EVENT_T_TIMER event to
+ * @param ev_cb The function to call on this callout for the host
+ * task used to provide multiple timer events to
+ * a task (this can be NULL).
+ * @param ev_arg The argument to provide to the event when posting
+ * the timer.
*/
void os_callout_init(struct os_callout *c, struct os_eventq *evq,
os_event_fn *ev_cb, void *ev_arg);
@@ -84,7 +84,7 @@ void os_callout_init(struct os_callout *c, struct os_eventq *evq,
/**
* Stop the callout from firing off, any pending events will be cleared.
*
- * @param c The callout to stop
+ * @param c The callout to stop
*/
void os_callout_stop(struct os_callout *c);
@@ -92,29 +92,31 @@ void os_callout_stop(struct os_callout *c);
/**
* Reset the callout to fire off in 'ticks' ticks.
*
- * @param c The callout to reset
- * @param ticks The number of ticks to wait before posting an event
+ * @param c The callout to reset
+ * @param ticks The number of ticks to wait before posting an event
*
- * @return 0 on success, non-zero on failure
+ * @return 0 on success;
+ * non-zero on failure
*/
int os_callout_reset(struct os_callout *c, os_time_t ticks);
/**
* Returns the number of ticks which remains to callout.
*
- * @param c The callout to check
- * @param now The current time in OS ticks
+ * @param c The callout to check
+ * @param now The current time in OS ticks
*
- * @return Number of ticks to first pending callout
+ * @return Number of ticks to first pending callout
*/
os_time_t os_callout_remaining_ticks(struct os_callout *c, os_time_t now);
/**
* Returns whether the callout is pending or not.
*
- * @param c The callout to check
+ * @param c The callout to check
*
- * @return 1 if queued, 0 if not queued.
+ * @return 1 if queued;
+ * 0 if not queued.
*/
static inline int
os_callout_queued(struct os_callout *c)
(mynewt-core) 03/03: kernel/os_callout: Remove doxygen comments from the source file
Posted by ja...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
janc pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/mynewt-core.git
commit 0b2a79cb35f30530123ce054c25a4ca019bbef94
Author: Wojciech Pietraszewski <wo...@codecoup.pl>
AuthorDate: Thu Jun 27 16:20:30 2024 +0200
kernel/os_callout: Remove doxygen comments from the source file
Moves documentation entries to the header file.
---
kernel/os/include/os/os_callout.h | 15 +++++++++++++++
kernel/os/src/os_callout.c | 14 --------------
2 files changed, 15 insertions(+), 14 deletions(-)
diff --git a/kernel/os/include/os/os_callout.h b/kernel/os/include/os/os_callout.h
index 2002de734..cd65a75ff 100644
--- a/kernel/os/include/os/os_callout.h
+++ b/kernel/os/include/os/os_callout.h
@@ -128,7 +128,22 @@ os_callout_queued(struct os_callout *c)
* @cond INTERNAL_HIDDEN
*/
+/**
+ * This function is called by the OS in the time tick. It searches the list
+ * of callouts, and sees if any of them are ready to run. If they are ready
+ * to run, it posts an event for each callout that's ready to run,
+ * to the event queue provided to os_callout_init().
+ */
void os_callout_tick(void);
+
+/**
+ * Returns the number of ticks to the first pending callout. If there are no
+ * pending callouts then return OS_TIMEOUT_NEVER instead.
+ *
+ * @param now The time now
+ *
+ * @return Number of ticks to first pending callout
+ */
os_time_t os_callout_wakeup_ticks(os_time_t now);
/**
diff --git a/kernel/os/src/os_callout.c b/kernel/os/src/os_callout.c
index 0526a4c91..18d4db6f7 100644
--- a/kernel/os/src/os_callout.c
+++ b/kernel/os/src/os_callout.c
@@ -114,12 +114,6 @@ err:
}
-/**
- * This function is called by the OS in the time tick. It searches the list
- * of callouts, and sees if any of them are ready to run. If they are ready
- * to run, it posts an event for each callout that's ready to run,
- * to the event queue provided to os_callout_init().
- */
void
os_callout_tick(void)
{
@@ -158,14 +152,6 @@ os_callout_tick(void)
os_trace_api_ret(OS_TRACE_ID_CALLOUT_TICK);
}
-/*
- * Returns the number of ticks to the first pending callout. If there are no
- * pending callouts then return OS_TIMEOUT_NEVER instead.
- *
- * @param now The time now
- *
- * @return Number of ticks to first pending callout
- */
os_time_t
os_callout_wakeup_ticks(os_time_t now)
{
(mynewt-core) 01/03: kernel/os_callout: Add parameter names
Posted by ja...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
janc pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/mynewt-core.git
commit 09d893657dff3036f47b2f42e6248df9aeaed223
Author: Wojciech Pietraszewski <wo...@codecoup.pl>
AuthorDate: Thu Jun 27 15:48:17 2024 +0200
kernel/os_callout: Add parameter names
Adds missing parameter names to function declarations
---
kernel/os/include/os/os_callout.h | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/kernel/os/include/os/os_callout.h b/kernel/os/include/os/os_callout.h
index b407f3f44..946dcfba4 100644
--- a/kernel/os/include/os/os_callout.h
+++ b/kernel/os/include/os/os_callout.h
@@ -77,7 +77,7 @@ TAILQ_HEAD(os_callout_list, os_callout);
* @param ev_arg The argument to provide to the event when posting the
* timer.
*/
-void os_callout_init(struct os_callout *cf, struct os_eventq *evq,
+void os_callout_init(struct os_callout *c, struct os_eventq *evq,
os_event_fn *ev_cb, void *ev_arg);
@@ -86,7 +86,7 @@ void os_callout_init(struct os_callout *cf, struct os_eventq *evq,
*
* @param c The callout to stop
*/
-void os_callout_stop(struct os_callout *);
+void os_callout_stop(struct os_callout *c);
/**
@@ -97,7 +97,7 @@ void os_callout_stop(struct os_callout *);
*
* @return 0 on success, non-zero on failure
*/
-int os_callout_reset(struct os_callout *, os_time_t);
+int os_callout_reset(struct os_callout *c, os_time_t ticks);
/**
* Returns the number of ticks which remains to callout.
@@ -107,7 +107,7 @@ int os_callout_reset(struct os_callout *, os_time_t);
*
* @return Number of ticks to first pending callout
*/
-os_time_t os_callout_remaining_ticks(struct os_callout *, os_time_t);
+os_time_t os_callout_remaining_ticks(struct os_callout *c, os_time_t now);
/**
* Returns whether the callout is pending or not.