This is an automated email from the ASF dual-hosted git repository. xiaoxiang pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/nuttx.git
commit 51bcec53c4f166d9fd07b02418491355b9463e1d Author: wangchengdong <[email protected]> AuthorDate: Mon Jan 12 11:42:54 2026 +0800 nuttx/sched: rename nxsched_timer_expiration rename nxsched_timer_expiration to nxsched_tick_expiration to align with nxsched_process_tick() Signed-off-by: Chengdong Wang <[email protected]> --- Documentation/ReleaseNotes/NuttX-7.29 | 2 +- Documentation/reference/os/nuttx.rst | 2 +- Documentation/reference/os/time_clock.rst | 16 ++++++++-------- drivers/timers/arch_alarm.c | 6 +++--- drivers/timers/arch_timer.c | 6 +++--- include/nuttx/arch.h | 14 +++++++------- sched/sched/sched.h | 4 ++-- sched/sched/sched_processtimer.c | 2 +- sched/sched/sched_timerexpiration.c | 6 +++--- 9 files changed, 29 insertions(+), 29 deletions(-) diff --git a/Documentation/ReleaseNotes/NuttX-7.29 b/Documentation/ReleaseNotes/NuttX-7.29 index e51c46dfdd6..5b6c01baf04 100644 --- a/Documentation/ReleaseNotes/NuttX-7.29 +++ b/Documentation/ReleaseNotes/NuttX-7.29 @@ -25,7 +25,7 @@ still needed). From Gregory Nutt. - Rename all internal OS functions from task_* to nxtask_* to indicate that they are NuttX internal functions. From Gregory Nutt. - Rename sched_process_timer to nxsched_process_timer. Rename -sched_timer_expiration to nxsched_timer_expiration. Rename +sched_timer_expiration to nxsched_tick_expiration. Rename sched_alarm_expiration to nxsched_alarm_expiration. Those are the appropriate names for an internal sched/ function (still many named incorrectly). From Gregory Nutt. diff --git a/Documentation/reference/os/nuttx.rst b/Documentation/reference/os/nuttx.rst index 5678d2d9bac..9e38497342e 100644 --- a/Documentation/reference/os/nuttx.rst +++ b/Documentation/reference/os/nuttx.rst @@ -22,7 +22,7 @@ OS List Management APIs periodically -- the calling interval must be ``CONFIG_USEC_PER_TICK``. -.. c:function:: void nxsched_timer_expiration(void) +.. c:function:: void nxsched_tick_expiration(void) Description: if ``CONFIG_SCHED_TICKLESS`` is defined, then this function is provided by the RTOS base code and called from diff --git a/Documentation/reference/os/time_clock.rst b/Documentation/reference/os/time_clock.rst index 86d35955827..c679ea949b0 100644 --- a/Documentation/reference/os/time_clock.rst +++ b/Documentation/reference/os/time_clock.rst @@ -372,7 +372,7 @@ In addition to these imported interfaces, the RTOS will export the following interfaces for use by the platform-specific interval timer implementation: -- ``nxsched_timer_expiration()``: called by the platform-specific logic when the interval time expires. +- ``nxsched_tick_expiration()``: called by the platform-specific logic when the interval time expires. .. c:function:: void archname_timer_initialize(void) @@ -410,7 +410,7 @@ timer implementation: Cancel the alarm and return the time of cancellation of the alarm. These two steps need to be as nearly atomic as possible. - ``nxsched_timer_expiration()`` will not be called unless the alarm + ``nxsched_tick_expiration()`` will not be called unless the alarm is restarted with ``up_alarm_start()``. If, as a race condition, the alarm has already expired when this function is called, then time returned is the current time. @@ -427,13 +427,13 @@ timer implementation: .. c:function:: int up_alarm_start(FAR const struct timespec *ts) - Start the alarm. ``nxsched_timer_expiration()`` will be called + Start the alarm. ``nxsched_tick_expiration()`` will be called when the alarm occurs (unless ``up_alarm_cancel`` is called to stop it). :param ts: The time in the future at the alarm is expected to occur. When the alarm occurs the timer logic will call - ``nxsched_timer_expiration()``. + ``nxsched_tick_expiration()``. :return: Zero (OK) on success; a negated errno value on failure. @@ -445,11 +445,11 @@ timer implementation: Cancel the interval timer and return the time remaining on the timer. These two steps need to be as nearly atomic as possible. -``nxsched_timer_expiration()`` will not be called unless the timer +``nxsched_tick_expiration()`` will not be called unless the timer is restarted with ``up_timer_start()``. If, as a race condition, the timer has already expired when this function is called, then that pending interrupt must be cleared so that -``nxsched_timer_expiration()`` is not called spuriously and the +``nxsched_tick_expiration()`` is not called spuriously and the remaining time of zero should be returned. :param ts: Location to return the remaining time. Zero should be @@ -463,12 +463,12 @@ disabled internally to assure non-reentrancy. .. c:function:: int up_timer_start(FAR const struct timespec *ts) -Start the interval timer. ``nxsched_timer_expiration()`` will be +Start the interval timer. ``nxsched_tick_expiration()`` will be called at the completion of the timeout (unless ``up_timer_cancel()`` is called to stop the timing). :param ts: Provides the time interval until - ``nxsched_timer_expiration()`` is called. + ``nxsched_tick_expiration()`` is called. :return: Zero (OK) on success; a negated errno value on failure. diff --git a/drivers/timers/arch_alarm.c b/drivers/timers/arch_alarm.c index d7580662d68..72e6f35e5f6 100644 --- a/drivers/timers/arch_alarm.c +++ b/drivers/timers/arch_alarm.c @@ -301,7 +301,7 @@ int weak_function up_timer_gettime(struct timespec *ts) * Description: * Cancel the alarm and return the time of cancellation of the alarm. * These two steps need to be as nearly atomic as possible. - * nxsched_timer_expiration() will not be called unless the alarm is + * nxsched_tick_expiration() will not be called unless the alarm is * restarted with up_alarm_start(). * * If, as a race condition, the alarm has already expired when this @@ -360,14 +360,14 @@ int weak_function up_alarm_tick_cancel(FAR clock_t *ticks) * Name: up_alarm_start * * Description: - * Start the alarm. nxsched_timer_expiration() will be called when the + * Start the alarm. nxsched_tick_expiration() will be called when the * alarm occurs (unless up_alaram_cancel is called to stop it). * * Provided by platform-specific code and called from the RTOS base code. * * Input Parameters: * ts - The time in the future at the alarm is expected to occur. When the - * alarm occurs the timer logic will call nxsched_timer_expiration(). + * alarm occurs the timer logic will call nxsched_tick_expiration(). * * Returned Value: * Zero (OK) is returned on success; a negated errno value is returned on diff --git a/drivers/timers/arch_timer.c b/drivers/timers/arch_timer.c index 9b0c348b6c9..80129815860 100644 --- a/drivers/timers/arch_timer.c +++ b/drivers/timers/arch_timer.c @@ -295,7 +295,7 @@ int weak_function up_timer_gettime(struct timespec *ts) * Description: * Cancel the interval timer and return the time remaining on the timer. * These two steps need to be as nearly atomic as possible. - * nxsched_timer_expiration() will not be called unless the timer is + * nxsched_tick_expiration() will not be called unless the timer is * restarted with up_timer_start(). * * If, as a race condition, the timer has already expired when this @@ -344,14 +344,14 @@ int weak_function up_timer_tick_cancel(FAR clock_t *ticks) * Name: up_timer_start * * Description: - * Start the interval timer. nxsched_timer_expiration() will be called at + * Start the interval timer. nxsched_tick_expiration() will be called at * the completion of the timeout (unless up_timer_cancel is called to stop * the timing. * * Provided by platform-specific code and called from the RTOS base code. * * Input Parameters: - * ts - Provides the time interval until nxsched_timer_expiration() is + * ts - Provides the time interval until nxsched_tick_expiration() is * called. * * Returned Value: diff --git a/include/nuttx/arch.h b/include/nuttx/arch.h index 8adfb659308..f975ecfe395 100644 --- a/include/nuttx/arch.h +++ b/include/nuttx/arch.h @@ -1925,7 +1925,7 @@ void up_timer_initialize(void); * The RTOS will provide the following interfaces for use by the platform- * specific interval timer implementation: * - * void nxsched_timer_expiration(void): Called by the platform-specific + * void nxsched_tick_expiration(void): Called by the platform-specific * logic when the interval timer expires. * ****************************************************************************/ @@ -1973,7 +1973,7 @@ void up_timer_getmask(FAR clock_t *mask); * Description: * Cancel the alarm and return the time of cancellation of the alarm. * These two steps need to be as nearly atomic as possible. - * nxsched_timer_expiration() will not be called unless the alarm is + * nxsched_tick_expiration() will not be called unless the alarm is * restarted with up_alarm_start(). * * If, as a race condition, the alarm has already expired when this @@ -2010,7 +2010,7 @@ int up_alarm_tick_cancel(FAR clock_t *ticks); * Name: up_alarm_start * * Description: - * Start the alarm. nxsched_timer_expiration() will be called when the + * Start the alarm. nxsched_tick_expiration() will be called when the * alarm occurs (unless up_alaram_cancel is called to stop it). * * Provided by platform-specific code and called from the RTOS base code. @@ -2018,7 +2018,7 @@ int up_alarm_tick_cancel(FAR clock_t *ticks); * Input Parameters: * ts - The time in the future at the alarm is expected to occur. When * the alarm occurs the timer logic will call - * nxsched_timer_expiration(). + * nxsched_tick_expiration(). * * Returned Value: * Zero (OK) is returned on success; a negated errno value is returned on @@ -2042,7 +2042,7 @@ int up_alarm_tick_start(clock_t ticks); * Description: * Cancel the interval timer and return the time remaining on the timer. * These two steps need to be as nearly atomic as possible. - * nxsched_timer_expiration() will not be called unless the timer is + * nxsched_tick_expiration() will not be called unless the timer is * restarted with up_timer_start(). * * If, as a race condition, the timer has already expired when this @@ -2081,14 +2081,14 @@ int up_timer_tick_cancel(FAR clock_t *ticks); * Name: up_timer_start * * Description: - * Start the interval timer. nxsched_timer_expiration() will be called at + * Start the interval timer. nxsched_tick_expiration() will be called at * the completion of the timeout (unless up_timer_cancel is called to stop * the timing. * * Provided by platform-specific code and called from the RTOS base code. * * Input Parameters: - * ts - Provides the time interval until nxsched_timer_expiration() is + * ts - Provides the time interval until nxsched_tick_expiration() is * called. * * Returned Value: diff --git a/sched/sched/sched.h b/sched/sched/sched.h index 55704b2e439..6ad3a19a08f 100644 --- a/sched/sched/sched.h +++ b/sched/sched/sched.h @@ -308,7 +308,7 @@ extern volatile spinlock_t g_cpu_tasklistlock; ****************************************************************************/ /**************************************************************************** - * Name: nxsched_timer_expiration + * Name: nxsched_tick_expiration * * Description: * If CONFIG_SCHED_TICKLESS is defined, then this function is provided by @@ -328,7 +328,7 @@ extern volatile spinlock_t g_cpu_tasklistlock; ****************************************************************************/ #if defined(CONFIG_SCHED_TICKLESS) -void nxsched_timer_expiration(void); +void nxsched_tick_expiration(void); #endif int nxthread_create(FAR const char *name, uint8_t ttype, int priority, diff --git a/sched/sched/sched_processtimer.c b/sched/sched/sched_processtimer.c index 83ebadefb10..9dc7a076129 100644 --- a/sched/sched/sched_processtimer.c +++ b/sched/sched/sched_processtimer.c @@ -208,7 +208,7 @@ void nxsched_process_timer(void) #ifdef CONFIG_SCHED_TICKLESS /* Tickless scheduling */ - nxsched_timer_expiration(); + nxsched_tick_expiration(); #else /* Periodic tick-based scheduling */ diff --git a/sched/sched/sched_timerexpiration.c b/sched/sched/sched_timerexpiration.c index 1c1785e6d4b..51561dbd68b 100644 --- a/sched/sched/sched_timerexpiration.c +++ b/sched/sched/sched_timerexpiration.c @@ -92,7 +92,7 @@ static clock_t nxsched_timer_start(clock_t ticks, clock_t interval); static clock_t g_timer_tick; /* This is the duration of the currently active timer or, when - * nxsched_timer_expiration() is called, the duration of interval timer + * nxsched_tick_expiration() is called, the duration of interval timer * that just expired. The value zero means that no timer was active. */ @@ -373,7 +373,7 @@ static clock_t nxsched_timer_start(clock_t ticks, clock_t interval) ****************************************************************************/ /**************************************************************************** - * Name: nxsched_timer_expiration + * Name: nxsched_tick_expiration * * Description: * if CONFIG_SCHED_TICKLESS is defined, then this function is provided by @@ -388,7 +388,7 @@ static clock_t nxsched_timer_start(clock_t ticks, clock_t interval) * ****************************************************************************/ -void nxsched_timer_expiration(void) +void nxsched_tick_expiration(void) { irqstate_t flags; clock_t ticks;
