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

Function sched_note_cpu_resumed

drivers/note/note_driver.c:1014–1050  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1012}
1013
1014void sched_note_cpu_resumed(FAR struct tcb_s *tcb)
1015{
1016 struct note_cpu_resumed_s note;
1017 FAR struct note_driver_s **driver;
1018 bool formatted = false;
1019
1020 for (driver = g_note_drivers; *driver; driver++)
1021 {
1022 if (!note_isenabled_switch(*driver))
1023 {
1024 continue;
1025 }
1026
1027 if (note_cpu_resumed(*driver, tcb))
1028 {
1029 continue;
1030 }
1031
1032 if ((*driver)->ops->add == NULL)
1033 {
1034 continue;
1035 }
1036
1037 /* Format the note */
1038
1039 if (!formatted)
1040 {
1041 formatted = true;
1042 note_common(tcb, &note.ncr_cmn, sizeof(struct note_cpu_resumed_s),
1043 NOTE_CPU_RESUMED);
1044 }
1045
1046 /* Add the note to circular buffer */
1047
1048 note_add(*driver, &note, sizeof(struct note_cpu_resumed_s));
1049 }
1050}
1051#endif /* CONFIG_SMP */
1052#endif /* CONFIG_SCHED_INSTRUMENTATION_SWITCH */
1053

Callers

nothing calls this directly

Calls 2

note_isenabled_switchFunction · 0.85
note_commonFunction · 0.85

Tested by

no test coverage detected