diff options
| author | HiFiPhile <[email protected]> | 2025-04-11 23:07:22 +0200 |
|---|---|---|
| committer | HiFiPhile <[email protected]> | 2025-04-11 23:07:22 +0200 |
| commit | 459e2cd39ece797eb35f74ccace0db0a588b795a (patch) | |
| tree | 68e0f398392eb001ab64857575a2b76934519021 /src/common/tusb_fifo.c | |
| parent | 8d2310247c47160bf8de6e5f754284360ad7e937 (diff) | |
| parent | 865e3488f99209c57b73953428dccf2bc666f0be (diff) | |
Merge remote-tracking branch 'upstream/master' into async_io
Signed-off-by: HiFiPhile <[email protected]>
Diffstat (limited to 'src/common/tusb_fifo.c')
| -rw-r--r-- | src/common/tusb_fifo.c | 7 |
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); |
