summaryrefslogtreecommitdiff
path: root/src/common
diff options
context:
space:
mode:
authorHiFiPhile <[email protected]>2025-04-12 17:08:49 +0200
committerHiFiPhile <[email protected]>2025-04-12 17:08:49 +0200
commitb2a4407bd56a271af263b0b3b451873e430dacdf (patch)
tree4084fc6e6155d9148438777d2469b305c7983c15 /src/common
parentb4a762dd581a7393a4658e6387398a0a2bd69d17 (diff)
parent865e3488f99209c57b73953428dccf2bc666f0be (diff)
Merge remote-tracking branch 'upstream/master' into h7rs
Diffstat (limited to 'src/common')
-rw-r--r--src/common/tusb_fifo.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/common/tusb_fifo.c b/src/common/tusb_fifo.c
index 5f2dcabad..ecf002b09 100644
--- a/src/common/tusb_fifo.c
+++ b/src/common/tusb_fifo.c
@@ -916,8 +916,11 @@ bool tu_fifo_clear(tu_fifo_t *f)
Overwritable mode the fifo is set to
*/
/******************************************************************************/
-bool tu_fifo_set_overwritable(tu_fifo_t *f, bool overwritable)
-{
+bool tu_fifo_set_overwritable(tu_fifo_t *f, bool overwritable) {
+ if (f->overwritable == overwritable) {
+ return true;
+ }
+
_ff_lock(f->mutex_wr);
_ff_lock(f->mutex_rd);