mirror of
https://github.com/apache/nuttx.git
synced 2026-08-08 05:57:16 +00:00
sched/sched: Remove nxsched_tick_expiration.
This commit removed nxsched_tick_expiration to simplify the scheduler. Signed-off-by: ouyangxiangzhen <ouyangxiangzhen@xiaomi.com>
This commit is contained in:
parent
dedfc9af1f
commit
946bd659d8
3 changed files with 7 additions and 52 deletions
|
|
@ -307,30 +307,6 @@ extern volatile spinlock_t g_cpu_tasklistlock;
|
|||
* Public Function Prototypes
|
||||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
* Name: nxsched_tick_expiration
|
||||
*
|
||||
* 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 implement the tick-less OS expires.
|
||||
*
|
||||
* Input Parameters:
|
||||
* None
|
||||
*
|
||||
* Returned Value:
|
||||
* None
|
||||
*
|
||||
* Assumptions/Limitations:
|
||||
* Base code implementation assumes that this function is called from
|
||||
* interrupt handling logic with interrupts disabled.
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
#if defined(CONFIG_SCHED_TICKLESS)
|
||||
void nxsched_tick_expiration(void);
|
||||
#endif
|
||||
|
||||
int nxthread_create(FAR const char *name, uint8_t ttype, int priority,
|
||||
FAR void *stack_addr, int stack_size, main_t entry,
|
||||
FAR char * const argv[], FAR char * const envp[]);
|
||||
|
|
|
|||
|
|
@ -146,7 +146,7 @@ static inline void nxsched_process_scheduler(void)
|
|||
#endif
|
||||
|
||||
/****************************************************************************
|
||||
* Name: nxsched_process_tick
|
||||
* Name: nxsched_process_timer
|
||||
*
|
||||
* Description:
|
||||
* This function handles system timer events.
|
||||
|
|
@ -154,6 +154,8 @@ static inline void nxsched_process_scheduler(void)
|
|||
* architecture specific code, but must call the following OS
|
||||
* function periodically -- the calling interval must be
|
||||
* USEC_PER_TICK
|
||||
* These are standard interfaces that are exported by the OS
|
||||
* for use by the architecture specific logic
|
||||
*
|
||||
* Input Parameters:
|
||||
* None
|
||||
|
|
@ -163,7 +165,7 @@ static inline void nxsched_process_scheduler(void)
|
|||
*
|
||||
****************************************************************************/
|
||||
|
||||
static void nxsched_process_tick(void)
|
||||
void nxsched_process_timer(void)
|
||||
{
|
||||
#ifdef CONFIG_CLOCK_TIMEKEEPING
|
||||
/* Process wall time */
|
||||
|
|
@ -194,26 +196,3 @@ static void nxsched_process_tick(void)
|
|||
#endif
|
||||
}
|
||||
#endif
|
||||
|
||||
/****************************************************************************
|
||||
* System Timer Hooks
|
||||
*
|
||||
* These are standard interfaces that are exported by the OS
|
||||
* for use by the architecture specific logic
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
void nxsched_process_timer(void)
|
||||
{
|
||||
#ifdef CONFIG_SCHED_TICKLESS
|
||||
/* Tickless scheduling */
|
||||
|
||||
nxsched_tick_expiration();
|
||||
|
||||
#else
|
||||
/* Periodic tick-based scheduling */
|
||||
|
||||
nxsched_process_tick();
|
||||
|
||||
#endif
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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_tick_expiration() is called, the duration of interval timer
|
||||
* nxsched_process_timer() 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_tick_expiration
|
||||
* Name: nxsched_process_timer
|
||||
*
|
||||
* 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_tick_expiration(void)
|
||||
void nxsched_process_timer(void)
|
||||
{
|
||||
irqstate_t flags;
|
||||
clock_t ticks;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue