| 973 | } |
| 974 | |
| 975 | void sched_note_cpu_resume(FAR struct tcb_s *tcb, int cpu) |
| 976 | { |
| 977 | struct note_cpu_resume_s note; |
| 978 | FAR struct note_driver_s **driver; |
| 979 | bool formatted = false; |
| 980 | |
| 981 | for (driver = g_note_drivers; *driver; driver++) |
| 982 | { |
| 983 | if (!note_isenabled_switch(*driver)) |
| 984 | { |
| 985 | continue; |
| 986 | } |
| 987 | |
| 988 | if (note_cpu_resume(*driver, tcb, cpu)) |
| 989 | { |
| 990 | continue; |
| 991 | } |
| 992 | |
| 993 | if ((*driver)->ops->add == NULL) |
| 994 | { |
| 995 | continue; |
| 996 | } |
| 997 | |
| 998 | /* Format the note */ |
| 999 | |
| 1000 | if (!formatted) |
| 1001 | { |
| 1002 | formatted = true; |
| 1003 | note_common(tcb, ¬e.ncr_cmn, sizeof(struct note_cpu_resume_s), |
| 1004 | NOTE_CPU_RESUME); |
| 1005 | note.ncr_target = (uint8_t)cpu; |
| 1006 | } |
| 1007 | |
| 1008 | /* Add the note to circular buffer */ |
| 1009 | |
| 1010 | note_add(*driver, ¬e, sizeof(struct note_cpu_resume_s)); |
| 1011 | } |
| 1012 | } |
| 1013 | |
| 1014 | void sched_note_cpu_resumed(FAR struct tcb_s *tcb) |
| 1015 | { |
nothing calls this directly
no test coverage detected