Move scheduler instrumentation hooks out of sched.h (where they seem like application interfaces) and into nuttx/sched.h where it is clare that these are OS internal interfaces.
This commit is contained in:
parent
5675600946
commit
e879d0f423
2
arch
2
arch
@ -1 +1 @@
|
|||||||
Subproject commit 57328005643fab97828d3deb4a1cd3db70d89b02
|
Subproject commit ff28c33a233e86ab8d96434dcd87ccd5402e505b
|
2
configs
2
configs
@ -1 +1 @@
|
|||||||
Subproject commit 0ef97e910a44060bd20b5e96517344a324e965c3
|
Subproject commit e147b03efbd424a972e1dd61707c6182b90174f7
|
@ -82,4 +82,3 @@ config SYSLOG_CONSOLE
|
|||||||
output (syslog_putc). This is useful, for example, if the only console is a Telnet
|
output (syslog_putc). This is useful, for example, if the only console is a Telnet
|
||||||
console. Then in that case, console output from non-Telnet threads will go to
|
console. Then in that case, console output from non-Telnet threads will go to
|
||||||
the syslog output.
|
the syslog output.
|
||||||
|
|
||||||
|
@ -64,11 +64,6 @@ namespace std
|
|||||||
using ::sched_lock;
|
using ::sched_lock;
|
||||||
using ::sched_unlock;
|
using ::sched_unlock;
|
||||||
using ::sched_lockcount;
|
using ::sched_lockcount;
|
||||||
#ifdef CONFIG_SCHED_INSTRUMENTATION
|
|
||||||
using ::sched_note_start;
|
|
||||||
using ::sched_note_stop;
|
|
||||||
using ::sched_note_switch;
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif // __INCLUDE_CXX_CSCHED
|
#endif // __INCLUDE_CXX_CSCHED
|
||||||
|
@ -843,6 +843,49 @@ void sched_suspend_scheduler(FAR struct tcb_s *tcb);
|
|||||||
# define sched_suspend_scheduler(tcb)
|
# define sched_suspend_scheduler(tcb)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
/********************************************************************************
|
||||||
|
* Name: sched_note_*
|
||||||
|
*
|
||||||
|
* Description:
|
||||||
|
* If instrumentation of the scheduler is enabled, then some outboard logic
|
||||||
|
* must provide the following interfaces. These interfaces are not availalble
|
||||||
|
* to application code.
|
||||||
|
*
|
||||||
|
* Input Parameters:
|
||||||
|
* tcb - The TCB of the thread to be restarted.
|
||||||
|
*
|
||||||
|
* Returned Value:
|
||||||
|
* None
|
||||||
|
*
|
||||||
|
********************************************************************************/
|
||||||
|
|
||||||
|
#ifdef CONFIG_SCHED_INSTRUMENTATION
|
||||||
|
|
||||||
|
void sched_note_start(FAR struct tcb_s *tcb);
|
||||||
|
void sched_note_stop(FAR struct tcb_s *tcb);
|
||||||
|
void sched_note_switch(FAR struct tcb_s *fromtcb,
|
||||||
|
FAR struct tcb_s *totcb);
|
||||||
|
|
||||||
|
#ifdef CONFIG_SCHED_INSTRUMENTATION_PREEMPTION
|
||||||
|
void sched_note_premption(FAR struct tcb_s *tcb, bool locked);
|
||||||
|
#else
|
||||||
|
# define sched_note_premption(t,l)
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef CONFIG_SCHED_INSTRUMENTATION_CSECTION
|
||||||
|
void sched_note_csection(FAR struct tcb_s *tcb, bool enter);
|
||||||
|
#else
|
||||||
|
# define sched_note_csection(t,e)
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#else
|
||||||
|
# define sched_note_start(t)
|
||||||
|
# define sched_note_stop(t)
|
||||||
|
# define sched_note_switch(t1, t2)
|
||||||
|
# define sched_note_premption(t,l)
|
||||||
|
# define sched_note_csection(t,e)
|
||||||
|
#endif /* CONFIG_SCHED_INSTRUMENTATION */
|
||||||
|
|
||||||
#undef EXTERN
|
#undef EXTERN
|
||||||
#if defined(__cplusplus)
|
#if defined(__cplusplus)
|
||||||
}
|
}
|
||||||
|
@ -255,37 +255,6 @@ int sched_lock(void);
|
|||||||
int sched_unlock(void);
|
int sched_unlock(void);
|
||||||
int sched_lockcount(void);
|
int sched_lockcount(void);
|
||||||
|
|
||||||
/* If instrumentation of the scheduler is enabled, then some outboard logic
|
|
||||||
* must provide the following interfaces.
|
|
||||||
*/
|
|
||||||
|
|
||||||
#ifdef CONFIG_SCHED_INSTRUMENTATION
|
|
||||||
|
|
||||||
void sched_note_start(FAR struct tcb_s *tcb);
|
|
||||||
void sched_note_stop(FAR struct tcb_s *tcb);
|
|
||||||
void sched_note_switch(FAR struct tcb_s *fromtcb,
|
|
||||||
FAR struct tcb_s *totcb);
|
|
||||||
|
|
||||||
#ifdef CONFIG_SCHED_INSTRUMENTATION_PREEMPTION
|
|
||||||
void sched_note_premption(FAR struct tcb_s *tcb, bool locked);
|
|
||||||
#else
|
|
||||||
# define sched_note_premption(t,l)
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef CONFIG_SCHED_INSTRUMENTATION_CSECTION
|
|
||||||
void sched_note_csection(FAR struct tcb_s *tcb, bool enter);
|
|
||||||
#else
|
|
||||||
# define sched_note_csection(t,e)
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#else
|
|
||||||
# define sched_note_start(t)
|
|
||||||
# define sched_note_stop(t)
|
|
||||||
# define sched_note_switch(t1, t2)
|
|
||||||
# define sched_note_premption(t,l)
|
|
||||||
# define sched_note_csection(t,e)
|
|
||||||
#endif /* CONFIG_SCHED_INSTRUMENTATION */
|
|
||||||
|
|
||||||
#undef EXTERN
|
#undef EXTERN
|
||||||
#if defined(__cplusplus)
|
#if defined(__cplusplus)
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user