examples: fix noteprint compile error

The sched_note_string/bprintf/dump interfaces have been removed and replaced with printf and event

Signed-off-by: yinshengkai <yinshengkai@xiaomi.com>
This commit is contained in:
yinshengkai 2024-10-08 19:58:24 +08:00 committed by CeDeROM
parent 42f2b444a2
commit a7011eb6f6

View File

@ -81,28 +81,27 @@ int main(int argc, FAR char *argv[])
{ {
sched_note_printf(NOTE_TAG_ALWAYS, sched_note_printf(NOTE_TAG_ALWAYS,
"shced note test count = %d.", count++); "shced note test count = %d.", count++);
sched_note_string(NOTE_TAG_ALWAYS, str); sched_note_mark(NOTE_TAG_ALWAYS, str);
sched_note_dump(NOTE_TAG_ALWAYS, 1, &binary, sizeof(struct binary)); sched_note_printf(NOTE_TAG_ALWAYS, "%hhd", c);
sched_note_bprintf(NOTE_TAG_ALWAYS, 2, "%hhd", c); sched_note_printf(NOTE_TAG_ALWAYS, "%hd", s);
sched_note_bprintf(NOTE_TAG_ALWAYS, 3, "%hd", s); sched_note_printf(NOTE_TAG_ALWAYS, "%d", i);
sched_note_bprintf(NOTE_TAG_ALWAYS, 4, "%d", i); sched_note_printf(NOTE_TAG_ALWAYS, "%ld", l);
sched_note_bprintf(NOTE_TAG_ALWAYS, 5, "%ld", l);
#ifdef CONFIG_HAVE_LONG_LONG #ifdef CONFIG_HAVE_LONG_LONG
sched_note_bprintf(NOTE_TAG_ALWAYS, 6, "%lld", ll); sched_note_printf(NOTE_TAG_ALWAYS, "%lld", ll);
#endif #endif
sched_note_bprintf(NOTE_TAG_ALWAYS, 7, "%jd", im); sched_note_printf(NOTE_TAG_ALWAYS, "%jd", im);
sched_note_bprintf(NOTE_TAG_ALWAYS, 8, "%zd", sz); sched_note_printf(NOTE_TAG_ALWAYS, "%zd", sz);
sched_note_bprintf(NOTE_TAG_ALWAYS, 9, "%td", ptr); sched_note_printf(NOTE_TAG_ALWAYS, "%td", ptr);
#ifdef CONFIG_HAVE_FLOAT #ifdef CONFIG_HAVE_FLOAT
sched_note_bprintf(NOTE_TAG_ALWAYS, 10, "%e", f); sched_note_printf(NOTE_TAG_ALWAYS, "%e", f);
#endif #endif
#ifdef CONFIG_HAVE_DOUBLE #ifdef CONFIG_HAVE_DOUBLE
sched_note_bprintf(NOTE_TAG_ALWAYS, 11, "%le", d); sched_note_printf(NOTE_TAG_ALWAYS, "%le", d);
#endif #endif
#ifdef CONFIG_HAVE_LONG_DOUBLE #ifdef CONFIG_HAVE_LONG_DOUBLE
sched_note_bprintf(NOTE_TAG_ALWAYS, 12, "%Le", ld); sched_note_printf(NOTE_TAG_ALWAYS, "%Le", ld);
#endif #endif
sched_note_bprintf(NOTE_TAG_ALWAYS, 13, sched_note_printf(NOTE_TAG_ALWAYS,
"%hhd %hd %d %ld %lld %jd %zd %td", "%hhd %hd %d %ld %lld %jd %zd %td",
c, s, i, l, ll, im, sz, ptr); c, s, i, l, ll, im, sz, ptr);
usleep(10); usleep(10);