pkarashchenko commented on a change in pull request #5915: URL: https://github.com/apache/incubator-nuttx/pull/5915#discussion_r840367589
########## File path: include/nuttx/sched_note.h ########## @@ -105,16 +105,38 @@ memset((s), 0, sizeof(struct note_filter_irq_s)) #endif -/* Note dump module tag definitions */ - #ifdef CONFIG_SCHED_INSTRUMENTATION_DUMP -# define NOTE_MODULE(a, b, c, d) \ - ((uint32_t)((a) & 0xff) | \ - ((uint32_t)((b) & 0xff) << 8) | \ - ((uint32_t)((c) & 0xff) << 16) | \ - ((uint32_t)((d) & 0xff) << 24)) +# define SCHED_NOTE_LABEL__(x, y) x ## y +# define SCHED_NOTE_LABEL_(x, y) SCHED_NOTE_LABEL__(x, y) +# define SCHED_NOTE_LABEL \ + SCHED_NOTE_LABEL_(sched_note_here, __LINE__) +# define SCHED_NOTE_IP \ + ({SCHED_NOTE_LABEL: (uintptr_t)&&SCHED_NOTE_LABEL;}) Review comment: This is a good improvement, but still I have a question why ``` # define SCHED_NOTE_STRING(buf) \ sched_note_string(__LINE__, buf) ``` should not work? I mean why do we need `&&`? -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@nuttx.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org