mirror of
https://github.com/apache/nuttx.git
synced 2026-05-23 23:28:29 +08:00
pipe: Increase buffer size by one byte to ompensate the full indicator
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
This commit is contained in:
committed by
Petro Karashchenko
parent
0332b78f99
commit
c29a3b7bd8
@@ -144,7 +144,7 @@ FAR struct pipe_dev_s *pipecommon_allocdev(size_t bufsize)
|
||||
nxsem_set_protocol(&dev->d_rdsem, SEM_PRIO_NONE);
|
||||
nxsem_set_protocol(&dev->d_wrsem, SEM_PRIO_NONE);
|
||||
|
||||
dev->d_bufsize = bufsize;
|
||||
dev->d_bufsize = bufsize + 1; /* +1 to compensate the full indicator */
|
||||
}
|
||||
|
||||
return dev;
|
||||
|
||||
Reference in New Issue
Block a user