Gary-Hobson commented on code in PR #7841:
URL: https://github.com/apache/nuttx/pull/7841#discussion_r1049503354


##########
include/nuttx/note/note_driver.h:
##########
@@ -35,6 +38,66 @@
  * Public Types
  ****************************************************************************/
 
+struct note_driver_s;
+
+struct note_driver_ops_s
+{
+  CODE void (*start)(FAR struct note_driver_s *drv, FAR struct tcb_s *tcb);
+  CODE void (*stop)(FAR struct note_driver_s *drv, FAR struct tcb_s *tcb);
+#ifdef CONFIG_SCHED_INSTRUMENTATION_SWITCH
+  CODE void (*suspend)(FAR struct note_driver_s *drv, FAR struct tcb_s *tcb);
+  CODE void (*resume)(FAR struct note_driver_s *drv, FAR struct tcb_s *tcb);
+#ifdef CONFIG_SMP
+  CODE void (*cpu_start)(FAR struct note_driver_s *drv,
+                         FAR struct tcb_s *tcb, int cpu);
+  CODE void (*cpu_started)(FAR struct note_driver_s *drv,
+                           FAR struct tcb_s *tcb);
+  CODE void (*cpu_pause)(FAR struct note_driver_s *drv,
+                         FAR struct tcb_s *tcb, int cpu);
+  CODE void (*cpu_paused)(FAR struct note_driver_s *drv,
+                          FAR struct tcb_s *tcb);
+  CODE void (*cpu_resume)(FAR struct note_driver_s *drv,
+                          FAR struct tcb_s *tcb, int cpu);
+  CODE void (*cpu_resumed)(FAR struct note_driver_s *drv,
+                           FAR struct tcb_s *tcb);
+#endif
+#endif
+#ifdef CONFIG_SCHED_INSTRUMENTATION_PREEMPTION
+  CODE void (*premption)(FAR struct note_driver_s *drv,
+                         FAR struct tcb_s *tcb, bool locked);
+#endif
+#ifdef CONFIG_SCHED_INSTRUMENTATION_CSECTION
+  CODE void (*csection)(FAR struct note_driver_s *drv,
+                        FAR struct tcb_s *tcb, bool enter);
+#endif
+#ifdef CONFIG_SCHED_INSTRUMENTATION_SPINLOCKS
+  CODE void (*spinlock)(FAR struct note_driver_s *drv, FAR struct tcb_s *tcb,
+                   FAR volatile void *spinlock, int type);
+#endif
+#ifdef CONFIG_SCHED_INSTRUMENTATION_SYSCALL
+  CODE void (*syscall_enter)(FAR struct note_driver_s *drv, int nr);
+  CODE void (*syscall_leave)(FAR struct note_driver_s *drv, int nr);
+#endif
+#ifdef CONFIG_SCHED_INSTRUMENTATION_IRQHANDLER
+  CODE void (*irqhandler)(FAR struct note_driver_s *drv, int irq,
+                          FAR void *handler, bool enter);
+#endif
+  CODE void (*write)(FAR struct note_driver_s *drv,
+                     FAR const void *note, size_t notelen);
+};
+
+struct note_driver_s
+{
+  FAR const struct note_driver_ops_s *ops;
+  FAR void *priv;
+};
+
+/****************************************************************************
+ * Public Data
+ ****************************************************************************/
+
+extern struct note_driver_s g_noteram_driver;

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

Reply via email to