Skip to content

Commit 51bcec5

Browse files
wangchdoxiaoxiang781216
authored andcommitted
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 <wangchengdong@lixiang.com>
1 parent 813ab96 commit 51bcec5

File tree

9 files changed

+29
-29
lines changed

9 files changed

+29
-29
lines changed

Documentation/ReleaseNotes/NuttX-7.29

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ still needed). From Gregory Nutt.
2525
- Rename all internal OS functions from task_* to nxtask_* to indicate
2626
that they are NuttX internal functions. From Gregory Nutt.
2727
- Rename sched_process_timer to nxsched_process_timer. Rename
28-
sched_timer_expiration to nxsched_timer_expiration. Rename
28+
sched_timer_expiration to nxsched_tick_expiration. Rename
2929
sched_alarm_expiration to nxsched_alarm_expiration. Those are the
3030
appropriate names for an internal sched/ function (still many named
3131
incorrectly). From Gregory Nutt.

Documentation/reference/os/nuttx.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ OS List Management APIs
2222
periodically -- the calling interval must be
2323
``CONFIG_USEC_PER_TICK``.
2424
25-
.. c:function:: void nxsched_timer_expiration(void)
25+
.. c:function:: void nxsched_tick_expiration(void)
2626
2727
Description: if ``CONFIG_SCHED_TICKLESS`` is defined, then this
2828
function is provided by the RTOS base code and called from

Documentation/reference/os/time_clock.rst

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -372,7 +372,7 @@ In addition to these imported interfaces, the RTOS will export the
372372
following interfaces for use by the platform-specific interval
373373
timer implementation:
374374

375-
- ``nxsched_timer_expiration()``: called by the platform-specific logic when the interval time expires.
375+
- ``nxsched_tick_expiration()``: called by the platform-specific logic when the interval time expires.
376376

377377
.. c:function:: void archname_timer_initialize(void)
378378
@@ -410,7 +410,7 @@ timer implementation:
410410
411411
Cancel the alarm and return the time of cancellation of the alarm.
412412
These two steps need to be as nearly atomic as possible.
413-
``nxsched_timer_expiration()`` will not be called unless the alarm
413+
``nxsched_tick_expiration()`` will not be called unless the alarm
414414
is restarted with ``up_alarm_start()``. If, as a race condition,
415415
the alarm has already expired when this function is called, then
416416
time returned is the current time.
@@ -427,13 +427,13 @@ timer implementation:
427427

428428
.. c:function:: int up_alarm_start(FAR const struct timespec *ts)
429429
430-
Start the alarm. ``nxsched_timer_expiration()`` will be called
430+
Start the alarm. ``nxsched_tick_expiration()`` will be called
431431
when the alarm occurs (unless ``up_alarm_cancel`` is called to
432432
stop it).
433433
434434
:param ts: The time in the future at the alarm is expected to
435435
occur. When the alarm occurs the timer logic will call
436-
``nxsched_timer_expiration()``.
436+
``nxsched_tick_expiration()``.
437437
438438
:return: Zero (OK) on success; a negated errno value on failure.
439439
@@ -445,11 +445,11 @@ timer implementation:
445445
446446
Cancel the interval timer and return the time remaining on the
447447
timer. These two steps need to be as nearly atomic as possible.
448-
``nxsched_timer_expiration()`` will not be called unless the timer
448+
``nxsched_tick_expiration()`` will not be called unless the timer
449449
is restarted with ``up_timer_start()``. If, as a race condition,
450450
the timer has already expired when this function is called, then
451451
that pending interrupt must be cleared so that
452-
``nxsched_timer_expiration()`` is not called spuriously and the
452+
``nxsched_tick_expiration()`` is not called spuriously and the
453453
remaining time of zero should be returned.
454454
455455
:param ts: Location to return the remaining time. Zero should be
@@ -463,12 +463,12 @@ disabled internally to assure non-reentrancy.
463463

464464
.. c:function:: int up_timer_start(FAR const struct timespec *ts)
465465
466-
Start the interval timer. ``nxsched_timer_expiration()`` will be
466+
Start the interval timer. ``nxsched_tick_expiration()`` will be
467467
called at the completion of the timeout (unless
468468
``up_timer_cancel()`` is called to stop the timing).
469469
470470
:param ts: Provides the time interval until
471-
``nxsched_timer_expiration()`` is called.
471+
``nxsched_tick_expiration()`` is called.
472472
473473
:return: Zero (OK) on success; a negated errno value on failure.
474474

drivers/timers/arch_alarm.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -301,7 +301,7 @@ int weak_function up_timer_gettime(struct timespec *ts)
301301
* Description:
302302
* Cancel the alarm and return the time of cancellation of the alarm.
303303
* These two steps need to be as nearly atomic as possible.
304-
* nxsched_timer_expiration() will not be called unless the alarm is
304+
* nxsched_tick_expiration() will not be called unless the alarm is
305305
* restarted with up_alarm_start().
306306
*
307307
* 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)
360360
* Name: up_alarm_start
361361
*
362362
* Description:
363-
* Start the alarm. nxsched_timer_expiration() will be called when the
363+
* Start the alarm. nxsched_tick_expiration() will be called when the
364364
* alarm occurs (unless up_alaram_cancel is called to stop it).
365365
*
366366
* Provided by platform-specific code and called from the RTOS base code.
367367
*
368368
* Input Parameters:
369369
* ts - The time in the future at the alarm is expected to occur. When the
370-
* alarm occurs the timer logic will call nxsched_timer_expiration().
370+
* alarm occurs the timer logic will call nxsched_tick_expiration().
371371
*
372372
* Returned Value:
373373
* Zero (OK) is returned on success; a negated errno value is returned on

drivers/timers/arch_timer.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -295,7 +295,7 @@ int weak_function up_timer_gettime(struct timespec *ts)
295295
* Description:
296296
* Cancel the interval timer and return the time remaining on the timer.
297297
* These two steps need to be as nearly atomic as possible.
298-
* nxsched_timer_expiration() will not be called unless the timer is
298+
* nxsched_tick_expiration() will not be called unless the timer is
299299
* restarted with up_timer_start().
300300
*
301301
* 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)
344344
* Name: up_timer_start
345345
*
346346
* Description:
347-
* Start the interval timer. nxsched_timer_expiration() will be called at
347+
* Start the interval timer. nxsched_tick_expiration() will be called at
348348
* the completion of the timeout (unless up_timer_cancel is called to stop
349349
* the timing.
350350
*
351351
* Provided by platform-specific code and called from the RTOS base code.
352352
*
353353
* Input Parameters:
354-
* ts - Provides the time interval until nxsched_timer_expiration() is
354+
* ts - Provides the time interval until nxsched_tick_expiration() is
355355
* called.
356356
*
357357
* Returned Value:

include/nuttx/arch.h

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1925,7 +1925,7 @@ void up_timer_initialize(void);
19251925
* The RTOS will provide the following interfaces for use by the platform-
19261926
* specific interval timer implementation:
19271927
*
1928-
* void nxsched_timer_expiration(void): Called by the platform-specific
1928+
* void nxsched_tick_expiration(void): Called by the platform-specific
19291929
* logic when the interval timer expires.
19301930
*
19311931
****************************************************************************/
@@ -1973,7 +1973,7 @@ void up_timer_getmask(FAR clock_t *mask);
19731973
* Description:
19741974
* Cancel the alarm and return the time of cancellation of the alarm.
19751975
* These two steps need to be as nearly atomic as possible.
1976-
* nxsched_timer_expiration() will not be called unless the alarm is
1976+
* nxsched_tick_expiration() will not be called unless the alarm is
19771977
* restarted with up_alarm_start().
19781978
*
19791979
* If, as a race condition, the alarm has already expired when this
@@ -2010,15 +2010,15 @@ int up_alarm_tick_cancel(FAR clock_t *ticks);
20102010
* Name: up_alarm_start
20112011
*
20122012
* Description:
2013-
* Start the alarm. nxsched_timer_expiration() will be called when the
2013+
* Start the alarm. nxsched_tick_expiration() will be called when the
20142014
* alarm occurs (unless up_alaram_cancel is called to stop it).
20152015
*
20162016
* Provided by platform-specific code and called from the RTOS base code.
20172017
*
20182018
* Input Parameters:
20192019
* ts - The time in the future at the alarm is expected to occur. When
20202020
* the alarm occurs the timer logic will call
2021-
* nxsched_timer_expiration().
2021+
* nxsched_tick_expiration().
20222022
*
20232023
* Returned Value:
20242024
* 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);
20422042
* Description:
20432043
* Cancel the interval timer and return the time remaining on the timer.
20442044
* These two steps need to be as nearly atomic as possible.
2045-
* nxsched_timer_expiration() will not be called unless the timer is
2045+
* nxsched_tick_expiration() will not be called unless the timer is
20462046
* restarted with up_timer_start().
20472047
*
20482048
* 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);
20812081
* Name: up_timer_start
20822082
*
20832083
* Description:
2084-
* Start the interval timer. nxsched_timer_expiration() will be called at
2084+
* Start the interval timer. nxsched_tick_expiration() will be called at
20852085
* the completion of the timeout (unless up_timer_cancel is called to stop
20862086
* the timing.
20872087
*
20882088
* Provided by platform-specific code and called from the RTOS base code.
20892089
*
20902090
* Input Parameters:
2091-
* ts - Provides the time interval until nxsched_timer_expiration() is
2091+
* ts - Provides the time interval until nxsched_tick_expiration() is
20922092
* called.
20932093
*
20942094
* Returned Value:

sched/sched/sched.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -308,7 +308,7 @@ extern volatile spinlock_t g_cpu_tasklistlock;
308308
****************************************************************************/
309309

310310
/****************************************************************************
311-
* Name: nxsched_timer_expiration
311+
* Name: nxsched_tick_expiration
312312
*
313313
* Description:
314314
* If CONFIG_SCHED_TICKLESS is defined, then this function is provided by
@@ -328,7 +328,7 @@ extern volatile spinlock_t g_cpu_tasklistlock;
328328
****************************************************************************/
329329

330330
#if defined(CONFIG_SCHED_TICKLESS)
331-
void nxsched_timer_expiration(void);
331+
void nxsched_tick_expiration(void);
332332
#endif
333333

334334
int nxthread_create(FAR const char *name, uint8_t ttype, int priority,

sched/sched/sched_processtimer.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -208,7 +208,7 @@ void nxsched_process_timer(void)
208208
#ifdef CONFIG_SCHED_TICKLESS
209209
/* Tickless scheduling */
210210

211-
nxsched_timer_expiration();
211+
nxsched_tick_expiration();
212212

213213
#else
214214
/* Periodic tick-based scheduling */

sched/sched/sched_timerexpiration.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ static clock_t nxsched_timer_start(clock_t ticks, clock_t interval);
9292
static clock_t g_timer_tick;
9393

9494
/* This is the duration of the currently active timer or, when
95-
* nxsched_timer_expiration() is called, the duration of interval timer
95+
* nxsched_tick_expiration() is called, the duration of interval timer
9696
* that just expired. The value zero means that no timer was active.
9797
*/
9898

@@ -373,7 +373,7 @@ static clock_t nxsched_timer_start(clock_t ticks, clock_t interval)
373373
****************************************************************************/
374374

375375
/****************************************************************************
376-
* Name: nxsched_timer_expiration
376+
* Name: nxsched_tick_expiration
377377
*
378378
* Description:
379379
* 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)
388388
*
389389
****************************************************************************/
390390

391-
void nxsched_timer_expiration(void)
391+
void nxsched_tick_expiration(void)
392392
{
393393
irqstate_t flags;
394394
clock_t ticks;

0 commit comments

Comments
 (0)