btashton commented on pull request #2039:
URL: https://github.com/apache/incubator-nuttx/pull/2039#issuecomment-712634377


   > there is one problem to let user control the buffer size: to support the 
hardware FIFO which is very popular on the new accel/gyro sensor model, sensor 
upper layer will extend the buffer temporarily to accumulate the bulk data and 
shrink the size once the userspace read out the data.
   y.
   
   I understand why the FIFO is important, but I think this still can work:
    * Track the ref count via the number of open fd on the driver
    * If count is 1 allow ioctl to resize the fifo, this would clear the fifo 
and resize the underlying malloc
    * if count is > 1 then the driver would fail to resize since it is already 
in use
   


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

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


Reply via email to