drivers/note: adjust the note_driver_ops definition

Signed-off-by: yinshengkai <yinshengkai@xiaomi.com>
This commit is contained in:
yinshengkai 2023-03-15 12:03:23 +08:00 committed by Alan Carvalho de Assis
parent 9ecaa022c8
commit 64e7e43f1f
4 changed files with 18 additions and 6 deletions

View File

@ -41,11 +41,13 @@ static void notelog_suspend(FAR struct note_driver_s *drv,
FAR struct tcb_s *tcb);
static void notelog_resume(FAR struct note_driver_s *drv,
FAR struct tcb_s *tcb);
# ifdef CONFIG_SMP
#endif
#ifdef CONFIG_SMP
static void notelog_cpu_start(FAR struct note_driver_s *drv,
FAR struct tcb_s *tcb, int cpu);
static void notelog_cpu_started(FAR struct note_driver_s *drv,
FAR struct tcb_s *tcb);
# ifdef CONFIG_SCHED_INSTRUMENTATION_SWITCH
static void notelog_cpu_pause(FAR struct note_driver_s *drv,
FAR struct tcb_s *tcb, int cpu);
static void notelog_cpu_paused(FAR struct note_driver_s *drv,
@ -87,14 +89,16 @@ static const struct note_driver_ops_s g_notelog_ops =
#ifdef CONFIG_SCHED_INSTRUMENTATION_SWITCH
notelog_suspend, /* suspend */
notelog_resume, /* resume */
#endif
#ifdef CONFIG_SMP
notelog_cpu_start, /* cpu_start */
notelog_cpu_started, /* cpu_started */
# ifdef CONFIG_SCHED_INSTRUMENTATION_SWITCH
notelog_cpu_pause, /* cpu_pause */
notelog_cpu_paused, /* cpu_paused */
notelog_cpu_resume, /* cpu_resume */
notelog_cpu_resumed, /* cpu_resumed */
#endif
# endif
#endif
#ifdef CONFIG_SCHED_INSTRUMENTATION_PREEMPTION
notelog_premption, /* premption */

View File

@ -71,11 +71,13 @@ static void notesnap_suspend(FAR struct note_driver_s *drv,
FAR struct tcb_s *tcb);
static void notesnap_resume(FAR struct note_driver_s *drv,
FAR struct tcb_s *tcb);
# ifdef CONFIG_SMP
#endif
#ifdef CONFIG_SMP
static void notesnap_cpu_start(FAR struct note_driver_s *drv,
FAR struct tcb_s *tcb, int cpu);
static void notesnap_cpu_started(FAR struct note_driver_s *drv,
FAR struct tcb_s *tcb);
# ifdef CONFIG_SCHED_INSTRUMENTATION_SWITCH
static void notesnap_cpu_pause(FAR struct note_driver_s *drv,
FAR struct tcb_s *tcb, int cpu);
static void notesnap_cpu_paused(FAR struct note_driver_s *drv,
@ -122,9 +124,11 @@ static const struct note_driver_ops_s g_notesnap_ops =
#ifdef CONFIG_SCHED_INSTRUMENTATION_SWITCH
notesnap_suspend,
notesnap_resume,
# ifdef CONFIG_SMP
#endif
#ifdef CONFIG_SMP
notesnap_cpu_start,
notesnap_cpu_started,
# ifdef CONFIG_SCHED_INSTRUMENTATION_SWITCH
notesnap_cpu_pause,
notesnap_cpu_paused,
notesnap_cpu_resume,

View File

@ -86,9 +86,11 @@ static const struct note_driver_ops_s g_note_sysview_ops =
#ifdef CONFIG_SCHED_INSTRUMENTATION_SWITCH
note_sysview_suspend, /* suspend */
note_sysview_resume, /* resume */
# ifdef CONFIG_SMP
#endif
#ifdef CONFIG_SMP
NULL, /* cpu_start */
NULL, /* cpu_started */
# ifdef CONFIG_SCHED_INSTRUMENTATION_SWITCH
NULL, /* cpu_pause */
NULL, /* cpu_paused */
NULL, /* cpu_resume */

View File

@ -50,11 +50,13 @@ struct note_driver_ops_s
#ifdef CONFIG_SCHED_INSTRUMENTATION_SWITCH
CODE void (*suspend)(FAR struct note_driver_s *drv, FAR struct tcb_s *tcb);
CODE void (*resume)(FAR struct note_driver_s *drv, FAR struct tcb_s *tcb);
# ifdef CONFIG_SMP
#endif
#ifdef CONFIG_SMP
CODE void (*cpu_start)(FAR struct note_driver_s *drv,
FAR struct tcb_s *tcb, int cpu);
CODE void (*cpu_started)(FAR struct note_driver_s *drv,
FAR struct tcb_s *tcb);
# ifdef CONFIG_SCHED_INSTRUMENTATION_SWITCH
CODE void (*cpu_pause)(FAR struct note_driver_s *drv,
FAR struct tcb_s *tcb, int cpu);
CODE void (*cpu_paused)(FAR struct note_driver_s *drv,