You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by da...@apache.org on 2020/08/29 09:57:50 UTC
[incubator-nuttx] 03/03: drivers/rwbuffer: Should call rwb_wrflush
in rwb_uninitialize
This is an automated email from the ASF dual-hosted git repository.
davids5 pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx.git
commit 62a840f992f209e144e716ed31718c5ceecbbb58
Author: Xiang Xiao <xi...@xiaomi.com>
AuthorDate: Fri Aug 21 19:46:39 2020 +0800
drivers/rwbuffer: Should call rwb_wrflush in rwb_uninitialize
to avoid lose the cached data in the write buffer
Signed-off-by: Xiang Xiao <xi...@xiaomi.com>
---
drivers/rwbuffer.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/rwbuffer.c b/drivers/rwbuffer.c
index 45a7aa5..106592a 100644
--- a/drivers/rwbuffer.c
+++ b/drivers/rwbuffer.c
@@ -880,6 +880,7 @@ void rwb_uninitialize(FAR struct rwbuffer_s *rwb)
if (rwb->wrmaxblocks > 0)
{
rwb_wrcanceltimeout(rwb);
+ rwb_wrflush(rwb);
nxsem_destroy(&rwb->wrsem);
if (rwb->wrbuffer)
{