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:
Xiang Xiao 2022-04-21 08:05:36 +08:00 committed by Petro Karashchenko
parent 0332b78f99
commit c29a3b7bd8

View file

@ -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;