Gary-Hobson commented on code in PR #7900: URL: https://github.com/apache/nuttx/pull/7900#discussion_r1056614447
########## drivers/note/note_driver.c: ########## @@ -435,6 +463,92 @@ static inline int note_isenabled_dump(void) } #endif +#if CONFIG_TASK_NAME_SIZE > 0 + +/**************************************************************************** + * Name: note_find_taskname + * + * Description: + * Find task name info corresponding to the specified PID + * + * Input Parameters: + * PID - Task ID + * + * Returned Value: + * Pointer to the task name info + * If the corresponding info doesn't exist in the buffer, NULL is returned. + * + ****************************************************************************/ + +static int note_find_taskname(pid_t pid, + FAR struct note_taskname_info_s *info) +{ + int n = g_note_taskname.tail; + while (n != g_note_taskname.head) + { + info = (FAR struct note_taskname_info_s *)&g_note_taskname. + buffer[n % g_note_taskname.size]; + n = (n + info->size) % g_note_taskname.size; + if (info->pid == pid) + { + return OK; Review Comment: done -- 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