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:
parent
0332b78f99
commit
c29a3b7bd8
1 changed files with 1 additions and 1 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue