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

Function sched_note_suspend

drivers/note/note_driver.c:743–780  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

741}
742
743void sched_note_suspend(FAR struct tcb_s *tcb)
744{
745 struct note_suspend_s note;
746 FAR struct note_driver_s **driver;
747 bool formatted = false;
748
749 for (driver = g_note_drivers; *driver; driver++)
750 {
751 if (!note_isenabled_switch(*driver))
752 {
753 continue;
754 }
755
756 if (note_suspend(*driver, tcb))
757 {
758 continue;
759 }
760
761 if ((*driver)->ops->add == NULL)
762 {
763 continue;
764 }
765
766 /* Format the note */
767
768 if (!formatted)
769 {
770 formatted = true;
771 note_common(tcb, &note.nsu_cmn, sizeof(struct note_suspend_s),
772 NOTE_SUSPEND);
773 note.nsu_state = tcb->task_state;
774 }
775
776 /* Add the note to circular buffer */
777
778 note_add(*driver, &note, sizeof(struct note_suspend_s));
779 }
780}
781
782void sched_note_resume(FAR struct tcb_s *tcb)
783{

Callers 1

nxsched_switch_contextFunction · 0.85

Calls 2

note_isenabled_switchFunction · 0.85
note_commonFunction · 0.85

Tested by

no test coverage detected