MCPcopy Create free account
hub / github.com/apache/nuttx / sched_note_stop

Function sched_note_stop

drivers/note/note_driver.c:701–741  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

699}
700
701void sched_note_stop(FAR struct tcb_s *tcb)
702{
703 struct note_stop_s note;
704 FAR struct note_driver_s **driver;
705 bool formatted = false;
706
707#if CONFIG_DRIVERS_NOTE_TASKNAME_BUFSIZE > 0
708 note_record_taskname(tcb->pid, tcb->name);
709#endif
710
711 for (driver = g_note_drivers; *driver; driver++)
712 {
713 if (!note_isenabled(*driver))
714 {
715 continue;
716 }
717
718 if (note_stop(*driver, tcb))
719 {
720 continue;
721 }
722
723 if ((*driver)->ops->add == NULL)
724 {
725 continue;
726 }
727
728 /* Format the note */
729
730 if (!formatted)
731 {
732 formatted = true;
733 note_common(tcb, &note.nsp_cmn, sizeof(struct note_stop_s),
734 NOTE_STOP);
735 }
736
737 /* Add the note to circular buffer */
738
739 note_add(*driver, &note, sizeof(struct note_stop_s));
740 }
741}
742
743void sched_note_suspend(FAR struct tcb_s *tcb)
744{

Callers 3

nxtask_activateFunction · 0.85
nxtask_exitFunction · 0.85
nxtask_terminateFunction · 0.85

Calls 3

note_record_tasknameFunction · 0.85
note_isenabledFunction · 0.85
note_commonFunction · 0.85

Tested by

no test coverage detected