sched/sched: Update the comments and docs.

This commit updated the comments and docs after removing the
nxsched_tick_expiration.

Signed-off-by: ouyangxiangzhen <ouyangxiangzhen@xiaomi.com>
This commit is contained in:
ouyangxiangzhen
2026-01-13 10:25:33 +08:00
committed by GUIDINGLI
parent 946bd659d8
commit 4514a11237
5 changed files with 21 additions and 31 deletions
-10
View File
@@ -22,16 +22,6 @@ OS List Management APIs
periodically -- the calling interval must be periodically -- the calling interval must be
``CONFIG_USEC_PER_TICK``. ``CONFIG_USEC_PER_TICK``.
.. 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
platform-specific code when the interval timer used to implemented
the tick-less OS expires.
**Assumptions**: Base code implementation assumes that this
function is called from interrupt handling logic with interrupts disabled.
.. c:function:: void irq_dispatch(int irq, FAR void *context) .. c:function:: void irq_dispatch(int irq, FAR void *context)
This function must be called from the This function must be called from the
+8 -8
View File
@@ -372,7 +372,7 @@ In addition to these imported interfaces, the RTOS will export the
following interfaces for use by the platform-specific interval following interfaces for use by the platform-specific interval
timer implementation: timer implementation:
- ``nxsched_tick_expiration()``: called by the platform-specific logic when the interval time expires. - ``nxsched_process_timer()``: called by the platform-specific logic when the interval time expires.
.. c:function:: void archname_timer_initialize(void) .. 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. Cancel the alarm and return the time of cancellation of the alarm.
These two steps need to be as nearly atomic as possible. These two steps need to be as nearly atomic as possible.
``nxsched_tick_expiration()`` will not be called unless the alarm ``nxsched_process_timer()`` will not be called unless the alarm
is restarted with ``up_alarm_start()``. If, as a race condition, is restarted with ``up_alarm_start()``. If, as a race condition,
the alarm has already expired when this function is called, then the alarm has already expired when this function is called, then
time returned is the current time. time returned is the current time.
@@ -427,13 +427,13 @@ timer implementation:
.. c:function:: int up_alarm_start(FAR const struct timespec *ts) .. c:function:: int up_alarm_start(FAR const struct timespec *ts)
Start the alarm. ``nxsched_tick_expiration()`` will be called Start the alarm. ``nxsched_process_timer()`` will be called
when the alarm occurs (unless ``up_alarm_cancel`` is called to when the alarm occurs (unless ``up_alarm_cancel`` is called to
stop it). stop it).
:param ts: The time in the future at the alarm is expected to :param ts: The time in the future at the alarm is expected to
occur. When the alarm occurs the timer logic will call occur. When the alarm occurs the timer logic will call
``nxsched_tick_expiration()``. ``nxsched_process_timer()``.
:return: Zero (OK) on success; a negated errno value on failure. :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 Cancel the interval timer and return the time remaining on the
timer. These two steps need to be as nearly atomic as possible. timer. These two steps need to be as nearly atomic as possible.
``nxsched_tick_expiration()`` will not be called unless the timer ``nxsched_process_timer()`` will not be called unless the timer
is restarted with ``up_timer_start()``. If, as a race condition, is restarted with ``up_timer_start()``. If, as a race condition,
the timer has already expired when this function is called, then the timer has already expired when this function is called, then
that pending interrupt must be cleared so that that pending interrupt must be cleared so that
``nxsched_tick_expiration()`` is not called spuriously and the ``nxsched_process_timer()`` is not called spuriously and the
remaining time of zero should be returned. remaining time of zero should be returned.
:param ts: Location to return the remaining time. Zero should be :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) .. c:function:: int up_timer_start(FAR const struct timespec *ts)
Start the interval timer. ``nxsched_tick_expiration()`` will be Start the interval timer. ``nxsched_process_timer()`` will be
called at the completion of the timeout (unless called at the completion of the timeout (unless
``up_timer_cancel()`` is called to stop the timing). ``up_timer_cancel()`` is called to stop the timing).
:param ts: Provides the time interval until :param ts: Provides the time interval until
``nxsched_tick_expiration()`` is called. ``nxsched_process_timer()`` is called.
:return: Zero (OK) on success; a negated errno value on failure. :return: Zero (OK) on success; a negated errno value on failure.
+3 -3
View File
@@ -301,7 +301,7 @@ int weak_function up_timer_gettime(struct timespec *ts)
* Description: * Description:
* Cancel the alarm and return the time of cancellation of the alarm. * Cancel the alarm and return the time of cancellation of the alarm.
* These two steps need to be as nearly atomic as possible. * These two steps need to be as nearly atomic as possible.
* nxsched_tick_expiration() will not be called unless the alarm is * nxsched_process_timer() will not be called unless the alarm is
* restarted with up_alarm_start(). * restarted with up_alarm_start().
* *
* If, as a race condition, the alarm has already expired when this * 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 * Name: up_alarm_start
* *
* Description: * Description:
* Start the alarm. nxsched_tick_expiration() will be called when the * Start the alarm. nxsched_process_timer() will be called when the
* alarm occurs (unless up_alaram_cancel is called to stop it). * alarm occurs (unless up_alaram_cancel is called to stop it).
* *
* Provided by platform-specific code and called from the RTOS base code. * Provided by platform-specific code and called from the RTOS base code.
* *
* Input Parameters: * Input Parameters:
* ts - The time in the future at the alarm is expected to occur. When the * ts - The time in the future at the alarm is expected to occur. When the
* alarm occurs the timer logic will call nxsched_tick_expiration(). * alarm occurs the timer logic will call nxsched_process_timer().
* *
* Returned Value: * Returned Value:
* Zero (OK) is returned on success; a negated errno value is returned on * Zero (OK) is returned on success; a negated errno value is returned on
+3 -3
View File
@@ -295,7 +295,7 @@ int weak_function up_timer_gettime(struct timespec *ts)
* Description: * Description:
* Cancel the interval timer and return the time remaining on the timer. * Cancel the interval timer and return the time remaining on the timer.
* These two steps need to be as nearly atomic as possible. * These two steps need to be as nearly atomic as possible.
* nxsched_tick_expiration() will not be called unless the timer is * nxsched_process_timer() will not be called unless the timer is
* restarted with up_timer_start(). * restarted with up_timer_start().
* *
* If, as a race condition, the timer has already expired when this * 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 * Name: up_timer_start
* *
* Description: * Description:
* Start the interval timer. nxsched_tick_expiration() will be called at * Start the interval timer. nxsched_process_timer() will be called at
* the completion of the timeout (unless up_timer_cancel is called to stop * the completion of the timeout (unless up_timer_cancel is called to stop
* the timing. * the timing.
* *
* Provided by platform-specific code and called from the RTOS base code. * Provided by platform-specific code and called from the RTOS base code.
* *
* Input Parameters: * Input Parameters:
* ts - Provides the time interval until nxsched_tick_expiration() is * ts - Provides the time interval until nxsched_process_timer() is
* called. * called.
* *
* Returned Value: * Returned Value:
+7 -7
View File
@@ -1925,7 +1925,7 @@ void up_timer_initialize(void);
* The RTOS will provide the following interfaces for use by the platform- * The RTOS will provide the following interfaces for use by the platform-
* specific interval timer implementation: * specific interval timer implementation:
* *
* void nxsched_tick_expiration(void): Called by the platform-specific * void nxsched_process_timer(void): Called by the platform-specific
* logic when the interval timer expires. * logic when the interval timer expires.
* *
****************************************************************************/ ****************************************************************************/
@@ -1973,7 +1973,7 @@ void up_timer_getmask(FAR clock_t *mask);
* Description: * Description:
* Cancel the alarm and return the time of cancellation of the alarm. * Cancel the alarm and return the time of cancellation of the alarm.
* These two steps need to be as nearly atomic as possible. * These two steps need to be as nearly atomic as possible.
* nxsched_tick_expiration() will not be called unless the alarm is * nxsched_process_timer() will not be called unless the alarm is
* restarted with up_alarm_start(). * restarted with up_alarm_start().
* *
* If, as a race condition, the alarm has already expired when this * 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 * Name: up_alarm_start
* *
* Description: * Description:
* Start the alarm. nxsched_tick_expiration() will be called when the * Start the alarm. nxsched_process_timer() will be called when the
* alarm occurs (unless up_alaram_cancel is called to stop it). * alarm occurs (unless up_alaram_cancel is called to stop it).
* *
* Provided by platform-specific code and called from the RTOS base code. * 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: * Input Parameters:
* ts - The time in the future at the alarm is expected to occur. When * ts - The time in the future at the alarm is expected to occur. When
* the alarm occurs the timer logic will call * the alarm occurs the timer logic will call
* nxsched_tick_expiration(). * nxsched_process_timer().
* *
* Returned Value: * Returned Value:
* Zero (OK) is returned on success; a negated errno value is returned on * 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: * Description:
* Cancel the interval timer and return the time remaining on the timer. * Cancel the interval timer and return the time remaining on the timer.
* These two steps need to be as nearly atomic as possible. * These two steps need to be as nearly atomic as possible.
* nxsched_tick_expiration() will not be called unless the timer is * nxsched_process_timer() will not be called unless the timer is
* restarted with up_timer_start(). * restarted with up_timer_start().
* *
* If, as a race condition, the timer has already expired when this * 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 * Name: up_timer_start
* *
* Description: * Description:
* Start the interval timer. nxsched_tick_expiration() will be called at * Start the interval timer. nxsched_process_timer() will be called at
* the completion of the timeout (unless up_timer_cancel is called to stop * the completion of the timeout (unless up_timer_cancel is called to stop
* the timing. * the timing.
* *
* Provided by platform-specific code and called from the RTOS base code. * Provided by platform-specific code and called from the RTOS base code.
* *
* Input Parameters: * Input Parameters:
* ts - Provides the time interval until nxsched_tick_expiration() is * ts - Provides the time interval until nxsched_process_timer() is
* called. * called.
* *
* Returned Value: * Returned Value: