You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by GitBox <gi...@apache.org> on 2023/01/10 12:37:20 UTC

[GitHub] [nuttx] XinStellaris commented on pull request #8067: net/local:set POLLIN/POLLOUT threshold for local fifo

XinStellaris commented on PR #8067:
URL: https://github.com/apache/nuttx/pull/8067#issuecomment-1377197968

   The local udp socket has some #warning , for example:
   
   ```
   #ifdef CONFIG_NET_LOCAL_DGRAM
   int local_release_halfduplex(FAR struct local_conn_s *conn)
   {
   #if 1
     /* REVISIT: We need to think about this carefully.  Unlike the connection-
      * oriented Unix domain socket, we don't really know the best time to
      * release the FIFO resource.  It would be extremely inefficient to create
      * and destroy the FIFO on each packet. But, on the other hand, failing
      * to destroy the FIFO will leave the FIFO resources in place after the
      * communications have completed.
      *
      * I am thinking that there should be something like a timer.  The timer
      * would be started at the completion of each transfer and cancelled at
      * the beginning of each transfer.  If the timer expires, then the FIFO
      * would be destroyed.
      */
   
   #  warning Missing logic
     return OK;
   
   #else
     char path[LOCAL_FULLPATH_LEN];
   
     /* Destroy the half duplex FIFO if it exists. */
   
     local_hd_name(conn->lc_path, path);
     return local_release_fifo(path);
   #endif
   }
   #endif /* CONFIG_NET_LOCAL_DGRAM */
   ```
    I guess no one used it before? Anyway, I fixed the potential bug.


-- 
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-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org