No subject


Thu Nov 6 11:49:12 CET 2008


revents[1] = 0 in any way different than revents[0] = 0, revents[1] =
POLLIN?

Also, a quick search with google code search reveals that everyone
trusted the doxygen docs and treated revents as a single integer:

http://www.google.de/codesearch?num=30&hl=en&safe=off&client=firefox-a&rls=org.mozilla%3Aen-US%3Aofficial&hs=V74&q=snd_pcm_poll_descriptors_revents&btnG=Search

For example, the following systems treat it as a single integer:

PortAudio
mplayer
allegro
wine
clalsadrv
arts
alsa-oss
disorder
alsaplayer
mumble
PulseAudio

and that list goes on and on and on. In fact I couldn't find a single
package treating it is array. Really declaring this now an array will
hence result in breakage in lots and lots of applications.

Maybe the implementation should now actually follow the documentation
and make it really a single integer, given that this makes more sense
to the user anyway?

Also, what's the point of having the revents parameter anyway if it's
just about demangling the pollfd array? I mean, then you could simply
do this in place.  It's not just the documentation and the example
that suggest that this is a single integer, it's also the simple
signature of the function that suggests so.

So, please, make this a single integer. Really going back to making it
an array sounds like an awful solution to me.

BTW, pfds in snd_pcm_poll_descriptors_revents could use a 'const'.

Lennart

-- 
Lennart Poettering                        Red Hat, Inc.
lennart [at] poettering [dot] net         ICQ# 11060553
http://0pointer.net/lennart/           GnuPG 0x1A015CC4


More information about the Alsa-devel mailing list