Skip to content

Commit

Permalink
drivers/pipes: fix busyloop issue when circbuf is full
Browse files Browse the repository at this point in the history
pipecommon_poll always reutrn POLLOUT when the circbuf is full.

Signed-off-by: dongjiuzhu1 <dongjiuzhu1@xiaomi.com>
  • Loading branch information
Donny9 committed Aug 21, 2023
1 parent 0d39246 commit bed2e7b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/pipes/pipe_common.c
Original file line number Diff line number Diff line change
Expand Up @@ -713,7 +713,7 @@ int pipecommon_poll(FAR struct file *filep, FAR struct pollfd *fds,

eventset = 0;
if ((filep->f_oflags & O_WROK) &&
nbytes <= (dev->d_bufsize - dev->d_polloutthrd))
nbytes < (dev->d_bufsize - dev->d_polloutthrd))
{
eventset |= POLLOUT;
}
Expand Down

0 comments on commit bed2e7b

Please sign in to comment.