mirror of
https://github.com/apache/nuttx.git
synced 2026-06-01 16:59:28 +08:00
sched/sched and include/nuttx/arch.h: Rename sched_process_cpuload to nxsched_process_cpuload. All internal sched_ functions should be prefixed with nx. Remove duplicate prototype from nuttx/arch.h.
This commit is contained in:
committed by
Gregory Nutt
parent
fdba1eb788
commit
d7a602e9b2
@@ -2053,28 +2053,6 @@ void sched_timer_expiration(void);
|
|||||||
void sched_alarm_expiration(FAR const struct timespec *ts);
|
void sched_alarm_expiration(FAR const struct timespec *ts);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/****************************************************************************
|
|
||||||
* Name: sched_process_cpuload
|
|
||||||
*
|
|
||||||
* Description:
|
|
||||||
* Collect data that can be used for CPU load measurements.
|
|
||||||
*
|
|
||||||
* Input Parameters:
|
|
||||||
* None
|
|
||||||
*
|
|
||||||
* Returned Value:
|
|
||||||
* None
|
|
||||||
*
|
|
||||||
* Assumptions/Limitations:
|
|
||||||
* This function is called from a timer interrupt handler with all
|
|
||||||
* interrupts disabled.
|
|
||||||
*
|
|
||||||
****************************************************************************/
|
|
||||||
|
|
||||||
#if defined(CONFIG_SCHED_CPULOAD) && defined(CONFIG_SCHED_CPULOAD_EXTCLK)
|
|
||||||
void weak_function sched_process_cpuload(void);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* Name: irq_dispatch
|
* Name: irq_dispatch
|
||||||
*
|
*
|
||||||
|
|||||||
+1
-1
@@ -821,7 +821,7 @@ config SCHED_CPULOAD_EXTCLK
|
|||||||
achieved. This option enables use of such an "external" clock. The
|
achieved. This option enables use of such an "external" clock. The
|
||||||
implementation of the clock must be provided by platform-specific
|
implementation of the clock must be provided by platform-specific
|
||||||
logic; that platform-specific logic must call the system function
|
logic; that platform-specific logic must call the system function
|
||||||
sched_process_cpuload() at each timer expiration with interrupts
|
nxsched_process_cpuload() at each timer expiration with interrupts
|
||||||
disabled.
|
disabled.
|
||||||
|
|
||||||
if SCHED_CPULOAD_EXTCLK
|
if SCHED_CPULOAD_EXTCLK
|
||||||
|
|||||||
+2
-2
@@ -490,10 +490,10 @@ void sched_tasklist_unlock(irqstate_t lock);
|
|||||||
# define sched_islocked_tcb(tcb) ((tcb)->lockcount > 0)
|
# define sched_islocked_tcb(tcb) ((tcb)->lockcount > 0)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if defined(CONFIG_SCHED_CPULOAD) && !defined(CONFIG_SCHED_CPULOAD_EXTCLK)
|
||||||
/* CPU load measurement support */
|
/* CPU load measurement support */
|
||||||
|
|
||||||
#if defined(CONFIG_SCHED_CPULOAD) && !defined(CONFIG_SCHED_CPULOAD_EXTCLK)
|
void weak_function nxsched_process_cpuload(void);
|
||||||
void weak_function sched_process_cpuload(void);
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Critical section monitor */
|
/* Critical section monitor */
|
||||||
|
|||||||
@@ -229,10 +229,10 @@ static void nxsched_oneshot_callback(FAR struct oneshot_lowerhalf_s *lower,
|
|||||||
/* Perform CPU load measurements */
|
/* Perform CPU load measurements */
|
||||||
|
|
||||||
#ifdef CONFIG_HAVE_WEAKFUNCTIONS
|
#ifdef CONFIG_HAVE_WEAKFUNCTIONS
|
||||||
if (sched_process_cpuload != NULL)
|
if (nxsched_process_cpuload != NULL)
|
||||||
#endif
|
#endif
|
||||||
{
|
{
|
||||||
sched_process_cpuload();
|
nxsched_process_cpuload();
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Then restart the oneshot */
|
/* Then restart the oneshot */
|
||||||
|
|||||||
@@ -185,10 +185,10 @@ static bool nxsched_period_callback(FAR uint32_t *next_interval_us,
|
|||||||
/* Perform CPU load measurements */
|
/* Perform CPU load measurements */
|
||||||
|
|
||||||
#ifdef CONFIG_HAVE_WEAKFUNCTIONS
|
#ifdef CONFIG_HAVE_WEAKFUNCTIONS
|
||||||
if (sched_process_cpuload != NULL)
|
if (nxsched_process_cpuload != NULL)
|
||||||
#endif
|
#endif
|
||||||
{
|
{
|
||||||
sched_process_cpuload();
|
nxsched_process_cpuload();
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Then continue the timing */
|
/* Then continue the timing */
|
||||||
|
|||||||
@@ -210,10 +210,10 @@ void sched_process_timer(void)
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#ifdef CONFIG_HAVE_WEAKFUNCTIONS
|
#ifdef CONFIG_HAVE_WEAKFUNCTIONS
|
||||||
if (sched_process_cpuload != NULL)
|
if (nxsched_process_cpuload != NULL)
|
||||||
#endif
|
#endif
|
||||||
{
|
{
|
||||||
sched_process_cpuload();
|
nxsched_process_cpuload();
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user