xiaoxiang781216 commented on code in PR #3782:
URL: https://github.com/apache/nuttx-apps/pull/3782#discussion_r4059878549


##########
netutils/ptpd/ptpd.c:
##########
@@ -181,6 +197,25 @@ struct ptp_state_s
   FAR const struct ptpd_config_s *config;
 };
 
+/****************************************************************************
+ * Private Data
+ ****************************************************************************/
+
+#ifdef CONFIG_BUILD_FLAT
+/* The status request of ptpd_status(). The daemon keeps its address until it
+ * answers, which can be after ptpd_status() gave up waiting and returned, so
+ * it lives in static memory and never on the stack of the caller. The lock
+ * lets only one caller use it at a time.
+ */
+
+static struct ptpd_statusreq_s g_statusreq =

Review Comment:
   why not change to stack variable and remove g_statusreq_lock 



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