mirror of
https://github.com/apache/nuttx.git
synced 2026-05-20 20:44:39 +08:00
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:
committed by
GUIDINGLI
parent
946bd659d8
commit
4514a11237
@@ -22,16 +22,6 @@ OS List Management APIs
|
||||
periodically -- the calling interval must be
|
||||
``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)
|
||||
|
||||
This function must be called from the
|
||||
|
||||
@@ -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_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)
|
||||
|
||||
@@ -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_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,
|
||||
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_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
|
||||
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_tick_expiration()``.
|
||||
``nxsched_process_timer()``.
|
||||
|
||||
: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_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,
|
||||
the timer has already expired when this function is called, then
|
||||
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.
|
||||
|
||||
: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_tick_expiration()`` will be
|
||||
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 timing).
|
||||
|
||||
: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.
|
||||
|
||||
|
||||
@@ -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_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().
|
||||
*
|
||||
* 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_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).
|
||||
*
|
||||
* 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_tick_expiration().
|
||||
* alarm occurs the timer logic will call nxsched_process_timer().
|
||||
*
|
||||
* Returned Value:
|
||||
* Zero (OK) is returned on success; a negated errno value is returned on
|
||||
|
||||
@@ -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_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().
|
||||
*
|
||||
* 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_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 timing.
|
||||
*
|
||||
* Provided by platform-specific code and called from the RTOS base code.
|
||||
*
|
||||
* Input Parameters:
|
||||
* ts - Provides the time interval until nxsched_tick_expiration() is
|
||||
* ts - Provides the time interval until nxsched_process_timer() is
|
||||
* called.
|
||||
*
|
||||
* Returned Value:
|
||||
|
||||
@@ -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_tick_expiration(void): Called by the platform-specific
|
||||
* void nxsched_process_timer(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_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().
|
||||
*
|
||||
* 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_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).
|
||||
*
|
||||
* 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_tick_expiration().
|
||||
* nxsched_process_timer().
|
||||
*
|
||||
* 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_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().
|
||||
*
|
||||
* 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_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 timing.
|
||||
*
|
||||
* Provided by platform-specific code and called from the RTOS base code.
|
||||
*
|
||||
* Input Parameters:
|
||||
* ts - Provides the time interval until nxsched_tick_expiration() is
|
||||
* ts - Provides the time interval until nxsched_process_timer() is
|
||||
* called.
|
||||
*
|
||||
* Returned Value:
|
||||
|
||||
Reference in New Issue
Block a user