sched/logging: add task activation/exit logs
Task activation/exit logs are helpful for device bringup, especially when user space nsh prompt doesn't show up. Putting them here will allow cleaning of logs in multiple up_exit() functions later. Signed-off-by: Yanfeng Liu <yfliu2008@qq.com>
This commit is contained in:
parent
3c327efd2f
commit
f280c33311
@ -84,6 +84,13 @@ void nxtask_activate(FAR struct tcb_s *tcb)
|
||||
|
||||
nxsched_remove_blocked(tcb);
|
||||
|
||||
#if CONFIG_TASK_NAME_SIZE > 0
|
||||
sinfo("%s pid=%d,TCB=%p\n", tcb->name,
|
||||
#else
|
||||
sinfo("pid=%d,TCB=%p\n",
|
||||
#endif
|
||||
tcb->pid, tcb);
|
||||
|
||||
/* Add the task to ready-to-run task list, and
|
||||
* perform the context switch if one is needed
|
||||
*/
|
||||
|
@ -25,6 +25,7 @@
|
||||
#include <nuttx/config.h>
|
||||
|
||||
#include <sched.h>
|
||||
#include <debug.h>
|
||||
|
||||
#include "sched/sched.h"
|
||||
|
||||
@ -88,6 +89,13 @@ int nxtask_exit(void)
|
||||
dtcb = this_task();
|
||||
#endif
|
||||
|
||||
#if CONFIG_TASK_NAME_SIZE > 0
|
||||
sinfo("%s pid=%d,TCB=%p\n", dtcb->name,
|
||||
#else
|
||||
sinfo("pid=%d,TCB=%p\n",
|
||||
#endif
|
||||
dtcb->pid, dtcb);
|
||||
|
||||
/* Update scheduler parameters */
|
||||
|
||||
nxsched_suspend_scheduler(dtcb);
|
||||
|
Loading…
Reference in New Issue
Block a user