Skip to content

Commit 30df081

Browse files
Gary-Hobsonxiaoxiang781216
authored andcommitted
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 <[email protected]>
1 parent d35dd65 commit 30df081

File tree

1 file changed

+15
-16
lines changed

1 file changed

+15
-16
lines changed

examples/noteprintf/noteprintf_main.c

Lines changed: 15 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -81,30 +81,29 @@ int main(int argc, FAR char *argv[])
8181
{
8282
sched_note_printf(NOTE_TAG_ALWAYS,
8383
"shced note test count = %d.", count++);
84-
sched_note_string(NOTE_TAG_ALWAYS, str);
85-
sched_note_dump(NOTE_TAG_ALWAYS, 1, &binary, sizeof(struct binary));
86-
sched_note_bprintf(NOTE_TAG_ALWAYS, 2, "%hhd", c);
87-
sched_note_bprintf(NOTE_TAG_ALWAYS, 3, "%hd", s);
88-
sched_note_bprintf(NOTE_TAG_ALWAYS, 4, "%d", i);
89-
sched_note_bprintf(NOTE_TAG_ALWAYS, 5, "%ld", l);
84+
sched_note_mark(NOTE_TAG_ALWAYS, str);
85+
sched_note_printf(NOTE_TAG_ALWAYS, "%hhd", c);
86+
sched_note_printf(NOTE_TAG_ALWAYS, "%hd", s);
87+
sched_note_printf(NOTE_TAG_ALWAYS, "%d", i);
88+
sched_note_printf(NOTE_TAG_ALWAYS, "%ld", l);
9089
#ifdef CONFIG_HAVE_LONG_LONG
91-
sched_note_bprintf(NOTE_TAG_ALWAYS, 6, "%lld", ll);
90+
sched_note_printf(NOTE_TAG_ALWAYS, "%lld", ll);
9291
#endif
93-
sched_note_bprintf(NOTE_TAG_ALWAYS, 7, "%jd", im);
94-
sched_note_bprintf(NOTE_TAG_ALWAYS, 8, "%zd", sz);
95-
sched_note_bprintf(NOTE_TAG_ALWAYS, 9, "%td", ptr);
92+
sched_note_printf(NOTE_TAG_ALWAYS, "%jd", im);
93+
sched_note_printf(NOTE_TAG_ALWAYS, "%zd", sz);
94+
sched_note_printf(NOTE_TAG_ALWAYS, "%td", ptr);
9695
#ifdef CONFIG_HAVE_FLOAT
97-
sched_note_bprintf(NOTE_TAG_ALWAYS, 10, "%e", f);
96+
sched_note_printf(NOTE_TAG_ALWAYS, "%e", f);
9897
#endif
9998
#ifdef CONFIG_HAVE_DOUBLE
100-
sched_note_bprintf(NOTE_TAG_ALWAYS, 11, "%le", d);
99+
sched_note_printf(NOTE_TAG_ALWAYS, "%le", d);
101100
#endif
102101
#ifdef CONFIG_HAVE_LONG_DOUBLE
103-
sched_note_bprintf(NOTE_TAG_ALWAYS, 12, "%Le", ld);
102+
sched_note_printf(NOTE_TAG_ALWAYS, "%Le", ld);
104103
#endif
105-
sched_note_bprintf(NOTE_TAG_ALWAYS, 13,
106-
"%hhd %hd %d %ld %lld %jd %zd %td",
107-
c, s, i, l, ll, im, sz, ptr);
104+
sched_note_printf(NOTE_TAG_ALWAYS,
105+
"%hhd %hd %d %ld %lld %jd %zd %td",
106+
c, s, i, l, ll, im, sz, ptr);
108107
usleep(10);
109108
}
110109

0 commit comments

Comments
 (0)