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

Function sched_note_cpu_pause

drivers/note/note_driver.c:898–935  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

896}
897
898void sched_note_cpu_pause(FAR struct tcb_s *tcb, int cpu)
899{
900 struct note_cpu_pause_s note;
901 FAR struct note_driver_s **driver;
902 bool formatted = false;
903
904 for (driver = g_note_drivers; *driver; driver++)
905 {
906 if (!note_isenabled_switch(*driver))
907 {
908 continue;
909 }
910
911 if (note_cpu_pause(*driver, tcb, cpu))
912 {
913 continue;
914 }
915
916 if ((*driver)->ops->add == NULL)
917 {
918 continue;
919 }
920
921 /* Format the note */
922
923 if (!formatted)
924 {
925 formatted = true;
926 note_common(tcb, &note.ncp_cmn, sizeof(struct note_cpu_pause_s),
927 NOTE_CPU_PAUSE);
928 note.ncp_target = (uint8_t)cpu;
929 }
930
931 /* Add the note to circular buffer */
932
933 note_add(*driver, &note, sizeof(struct note_cpu_pause_s));
934 }
935}
936
937void sched_note_cpu_paused(FAR struct tcb_s *tcb)
938{

Callers

nothing calls this directly

Calls 2

note_isenabled_switchFunction · 0.85
note_commonFunction · 0.85

Tested by

no test coverage detected