| 896 | } |
| 897 | |
| 898 | void 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, ¬e.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, ¬e, sizeof(struct note_cpu_pause_s)); |
| 934 | } |
| 935 | } |
| 936 | |
| 937 | void sched_note_cpu_paused(FAR struct tcb_s *tcb) |
| 938 | { |
nothing calls this directly
no test coverage detected