wangchdo commented on code in PR #17642:
URL: https://github.com/apache/nuttx/pull/17642#discussion_r2660493952


##########
include/nuttx/hrtimer.h:
##########
@@ -97,11 +84,11 @@ struct hrtimer_node_s
 
 struct hrtimer_s
 {
-  hrtimer_node_t          node;    /* RB-tree node for sorted insertion */
-  enum hrtimer_state_e    state;   /* Current timer state */
-  hrtimer_cb              func;    /* Expiration callback function */
-  FAR void               *arg;     /* Argument passed to callback */
-  uint64_t                expired; /* Absolute expiration time (ns) */
+  hrtimer_node_t node;   /* RB-tree node for sorted insertion */
+  hrtimer_cb func;       /* Expiration callback function */
+  FAR void *arg;         /* Argument passed to callback */
+  uint64_t expired;      /* Absolute expiration time (ns) */
+  uint8_t cpus;          /* Number of cpus that are running the timer */

Review Comment:
   Do you think `cpus `as a reference counter is more efficient than saving 
running hrtimer to global variables?
   
   If you don't think so and think It matters more to save memory by removing 
`cpus`, I think it is also OK and choose to save running hrtimer to global 
variables



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to