Skip to content

Commit 4f04151

Browse files
Gary-Hobsonxiaoxiang781216
authored andcommitted
exampels/note: modify SCHED_NOTE_XXX -> sched_note_xxx
Signed-off-by: yinshengkai <yinshengkai@xiaomi.com>
1 parent b58ecee commit 4f04151

File tree

1 file changed

+16
-15
lines changed

1 file changed

+16
-15
lines changed

examples/noteprintf/noteprintf_main.c

Lines changed: 16 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -79,29 +79,30 @@ int main(int argc, FAR char *argv[])
7979

8080
while (1)
8181
{
82-
SCHED_NOTE_PRINTF("shced note test count = %d.", count++);
83-
SCHED_NOTE_STRING(str);
84-
SCHED_NOTE_DUMP(1, &binary, sizeof(struct binary));
85-
SCHED_NOTE_BPRINTF(2, "%hhd", c);
86-
SCHED_NOTE_BPRINTF(3, "%hd", s);
87-
SCHED_NOTE_BPRINTF(4, "%d", i);
88-
SCHED_NOTE_BPRINTF(5, "%ld", l);
82+
sched_note_printf(NOTE_TAG_ALWAYS,
83+
"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);
8990
#ifdef CONFIG_HAVE_LONG_LONG
90-
SCHED_NOTE_BPRINTF(6, "%lld", ll);
91+
sched_note_bprintf(NOTE_TAG_ALWAYS, 6, "%lld", ll);
9192
#endif
92-
SCHED_NOTE_BPRINTF(7, "%jd", im);
93-
SCHED_NOTE_BPRINTF(8, "%zd", sz);
94-
SCHED_NOTE_BPRINTF(9, "%td", ptr);
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);
9596
#ifdef CONFIG_HAVE_FLOAT
96-
SCHED_NOTE_BPRINTF(10, "%e", f);
97+
sched_note_bprintf(NOTE_TAG_ALWAYS, 10, "%e", f);
9798
#endif
9899
#ifdef CONFIG_HAVE_DOUBLE
99-
SCHED_NOTE_BPRINTF(11, "%le", d);
100+
sched_note_bprintf(NOTE_TAG_ALWAYS, 11, "%le", d);
100101
#endif
101102
#ifdef CONFIG_HAVE_LONG_DOUBLE
102-
SCHED_NOTE_BPRINTF(12, "%Le", ld);
103+
sched_note_bprintf(NOTE_TAG_ALWAYS, 12, "%Le", ld);
103104
#endif
104-
SCHED_NOTE_BPRINTF(13,
105+
sched_note_bprintf(NOTE_TAG_ALWAYS, 13,
105106
"%hhd %hd %d %ld %lld %jd %zd %td",
106107
c, s, i, l, ll, im, sz, ptr);
107108
usleep(10);

0 commit comments

Comments
 (0)