PetervdPerk-NXP commented on code in PR #7809:
URL: https://github.com/apache/nuttx/pull/7809#discussion_r1043178896


##########
drivers/segger/note_sysview.c:
##########
@@ -275,7 +276,12 @@ static inline int sysview_isenabled_syscall(int nr)
  *
  ****************************************************************************/
 
-void sched_note_start(FAR struct tcb_s *tcb)
+void weak_function sched_note_start(FAR struct tcb_s *tcb)
+{
+  sysview_note_start(tcb);
+}
+
+void inline sysview_note_start(FAR struct tcb_s *tcb)

Review Comment:
   The idea to have the ability to overule the `sched_note_start` function but 
still be able to use the sysview functionality.
   For instance nx_start calls `sched_note_start` e.g.
   
https://github.com/apache/nuttx/blob/fdc1aa6ae31bd37b232622b8169ef47f100661ee/sched/init/nx_start.c#L634
   
   
   ```mermaid
   flowchart LR
   A[nx_start] -->|calls| B(sched_note_start)
   subgraph note_sysview.c
   B -->|inline| C(sysview_note_start)
       end
   ```
   ```mermaid
   flowchart LR
   A[nx_start] -->|calls| B(sched_note_start)
   subgraph custom_note_driver
   B --> C(custom_note_start)
       end
   subgraph note_sysview.c
   C -->|calls| D(sysview_note_start)
       end
   ```



-- 
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

Reply via email to