Skip to content

Commit

Permalink
examples: fix noteprint compile error
Browse files Browse the repository at this point in the history
The sched_note_string/bprintf/dump interfaces have been removed and replaced with printf and event

Signed-off-by: yinshengkai <[email protected]>
  • Loading branch information
Gary-Hobson authored and xiaoxiang781216 committed Oct 8, 2024
1 parent d35dd65 commit 30df081
Showing 1 changed file with 15 additions and 16 deletions.
31 changes: 15 additions & 16 deletions examples/noteprintf/noteprintf_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -81,30 +81,29 @@ int main(int argc, FAR char *argv[])
{
sched_note_printf(NOTE_TAG_ALWAYS,
"shced note test count = %d.", count++);
sched_note_string(NOTE_TAG_ALWAYS, str);
sched_note_dump(NOTE_TAG_ALWAYS, 1, &binary, sizeof(struct binary));
sched_note_bprintf(NOTE_TAG_ALWAYS, 2, "%hhd", c);
sched_note_bprintf(NOTE_TAG_ALWAYS, 3, "%hd", s);
sched_note_bprintf(NOTE_TAG_ALWAYS, 4, "%d", i);
sched_note_bprintf(NOTE_TAG_ALWAYS, 5, "%ld", l);
sched_note_mark(NOTE_TAG_ALWAYS, str);
sched_note_printf(NOTE_TAG_ALWAYS, "%hhd", c);
sched_note_printf(NOTE_TAG_ALWAYS, "%hd", s);
sched_note_printf(NOTE_TAG_ALWAYS, "%d", i);
sched_note_printf(NOTE_TAG_ALWAYS, "%ld", l);
#ifdef CONFIG_HAVE_LONG_LONG
sched_note_bprintf(NOTE_TAG_ALWAYS, 6, "%lld", ll);
sched_note_printf(NOTE_TAG_ALWAYS, "%lld", ll);
#endif
sched_note_bprintf(NOTE_TAG_ALWAYS, 7, "%jd", im);
sched_note_bprintf(NOTE_TAG_ALWAYS, 8, "%zd", sz);
sched_note_bprintf(NOTE_TAG_ALWAYS, 9, "%td", ptr);
sched_note_printf(NOTE_TAG_ALWAYS, "%jd", im);
sched_note_printf(NOTE_TAG_ALWAYS, "%zd", sz);
sched_note_printf(NOTE_TAG_ALWAYS, "%td", ptr);
#ifdef CONFIG_HAVE_FLOAT
sched_note_bprintf(NOTE_TAG_ALWAYS, 10, "%e", f);
sched_note_printf(NOTE_TAG_ALWAYS, "%e", f);
#endif
#ifdef CONFIG_HAVE_DOUBLE
sched_note_bprintf(NOTE_TAG_ALWAYS, 11, "%le", d);
sched_note_printf(NOTE_TAG_ALWAYS, "%le", d);
#endif
#ifdef CONFIG_HAVE_LONG_DOUBLE
sched_note_bprintf(NOTE_TAG_ALWAYS, 12, "%Le", ld);
sched_note_printf(NOTE_TAG_ALWAYS, "%Le", ld);
#endif
sched_note_bprintf(NOTE_TAG_ALWAYS, 13,
"%hhd %hd %d %ld %lld %jd %zd %td",
c, s, i, l, ll, im, sz, ptr);
sched_note_printf(NOTE_TAG_ALWAYS,
"%hhd %hd %d %ld %lld %jd %zd %td",
c, s, i, l, ll, im, sz, ptr);
usleep(10);
}

Expand Down

0 comments on commit 30df081

Please sign in to comment.