Update of /cvsroot/alsa/alsa-lib/src/pcm
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv7420
Modified Files:
pcm.c
Log Message:
Improved comments for poll_descriptors
Index: pcm.c
===================================================================
RCS file: /cvsroot/alsa/alsa-lib/src/pcm/pcm.c,v
retrieving revision 1.274
retrieving revision 1.275
diff -u -r1.274 -r1.275
--- pcm.c 2 Mar 2004 17:13:49 -0000 1.274
+++ pcm.c 3 Mar 2004 12:54:01 -0000 1.275
@@ -1220,9 +1220,13 @@
* PCM handle. The poll desctiptor array should have the size returned by
* \link ::snd_pcm_poll_descriptors_count() \endlink function.
*
+ * The result is intended for direct use with the poll() syscall.
+ *
* For reading the returned events of poll descriptor after poll() system
* call, use \link ::snd_pcm_poll_descriptors_revents() \endlink function.
- * The field values in pollfd structs may be bogus.
+ * The field values in pollfd structs may be bogus regarding the stream
+ * direction from the application perspective (POLLIN might not imply read
+ * direction and POLLOUT might not imply write).
*/
int snd_pcm_poll_descriptors(snd_pcm_t *pcm, struct pollfd *pfds, unsigned int space)
{
@@ -1243,6 +1247,9 @@
* \param nfds count of poll descriptors
* \param revents returned events
* \return zero if success, otherwise a negative error code
+ *
+ * This function does "demangling" of the revents mask returned from
+ * the poll() syscall to correct semantics (POLLIN = read, POLLOUT = write).
*/
int snd_pcm_poll_descriptors_revents(snd_pcm_t *pcm, struct pollfd *pfds, unsigned
int nfds, unsigned short *revents)
{
-------------------------------------------------------
SF.Net is sponsored by: Speed Start Your Linux Apps Now.
Build and deploy apps & Web services for Linux with
a free DVD software kit from IBM. Click Now!
http://ads.osdn.com/?ad_id=1356&alloc_id=3438&op=click
_______________________________________________
Alsa-cvslog mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/alsa-cvslog