acassis commented on code in PR #19225:
URL: https://github.com/apache/nuttx/pull/19225#discussion_r3482104755


##########
drivers/audio/tone.c:
##########
@@ -86,6 +86,7 @@ struct tone_upperhalf_s
   uint8_t channel;                     /* Output channel that drives the tone. 
*/
   volatile bool started;               /* True: pulsed output is being 
generated */
   mutex_t lock;                        /* Supports mutual exclusion */
+  mutex_t busy;                        /* Don't accept new writes if busy */

Review Comment:
   Because an application can lock it for its use (with the fd is opened) and 
this application can write many melodies as it wants. So, 'lock' if for locking 
competition, 'busy' is to avoid overwriting the tone buffer.



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