mirror of
https://github.com/apache/nuttx.git
synced 2026-05-20 04:16:35 +08:00
nuttx/sched: rename nxsched_timer_expiration
Build Documentation / build-html (push) Has been cancelled
Build Documentation / build-html (push) Has been cancelled
rename nxsched_timer_expiration to nxsched_tick_expiration
to align with nxsched_process_tick()
Signed-off-by: Chengdong Wang <wangchengdong@lixiang.com>
This commit is contained in:
committed by
Xiang Xiao
parent
813ab962f5
commit
51bcec53c4
@@ -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.
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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.
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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:
|
||||
|
||||
@@ -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:
|
||||
|
||||
+2
-2
@@ -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,
|
||||
|
||||
@@ -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 */
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user