]> code.delx.au - pulseaudio/commit
iochannel: Avoid unnecessary wakeup after successful write
authorDavid Henningsson <david.henningsson@canonical.com>
Thu, 13 Jun 2013 12:26:09 +0000 (14:26 +0200)
committerTanu Kaskinen <tanu.kaskinen@linux.intel.com>
Fri, 14 Jun 2013 10:45:57 +0000 (13:45 +0300)
commit9c4dcffca5c7b31d7ff4ce77146ad87559bf70ef
tree8e5bfc06b7e065cd49f166ee0319f3e6f65020ad
parente2d1421f6184e4fb8bcc694075a0ee26adaf4bee
iochannel: Avoid unnecessary wakeup after successful write

To save some CPU (in low latency scenarios), don't re-enable the
"writable" event after it has succeeded. It is very likely the next
write will succeed right away too.

This means that we always need to handle EAGAIN/EWOULDBLOCK as a
successful write of 0 bytes, so I also verified that all callers to
pa_iochannel_write handled this correctly.

Signed-off-by: David Henningsson <david.henningsson@canonical.com>
src/modules/module-esound-sink.c
src/pulsecore/iochannel.c
src/pulsecore/ioline.c
src/pulsecore/protocol-esound.c
src/pulsecore/protocol-http.c
src/pulsecore/protocol-simple.c