pkarashchenko commented on a change in pull request #5892:
URL: https://github.com/apache/incubator-nuttx/pull/5892#discussion_r839501747



##########
File path: fs/rpmsgfs/rpmsgfs.c
##########
@@ -252,6 +259,21 @@ static void rpmsgfs_mkpath(FAR struct rpmsgfs_mountpt_s  
*fs,
     {
       strncat(path, &relpath[first], pathlen - strlen(path) - 1);
     }
+
+  while (fs->timeout > 0)
+    {
+      struct stat buf;
+      int ret;
+
+      ret = rpmsgfs_client_stat(fs->handle, fs->fs_root, &buf);
+      if (ret == 0)
+        {
+          break;
+        }
+
+      usleep(RPMSGFS_RETRY_DELAY_MS * USEC_PER_MSEC);
+      fs->timeout -= RPMSGFS_RETRY_DELAY_MS;

Review comment:
       This is not very good for delay calculation. I mean that the error is 
very big due to dependency on systick granularity. The better way is to use 
`clock_systime_timespec()`.




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