Skip to contentSkip to conversation

: API compatibility with pselect(2)

ALSA - lib 0000898 [email protected] 1 participant 1 message Feb 14, 2005

lore
Share & tools
lore
#0 lore raw

The following issue has been RESOLVED.
======================================================================
<https://bugtrack.alsa-project.org/alsa-bug/view.php?id=898>
======================================================================

Reported By:                phunge
Assigned To:                tiwai
======================================================================
Project:                    ALSA - lib
Issue ID:                   898
Category:                   general
Reproducibility:            always
Severity:                   feature
Priority:                   normal
Status:                     resolved
Resolution:                 not an issue
Fixed in Version:           
======================================================================
Date Submitted:             02-09-2005 16:11 CET
Last Modified:              02-14-2005 16:09 CET

======================================================================
Summary: API compatibility with pselect(2)
Description:
I have a program which uses the ALSA sequencer API, and also uses setitimer() to trigger some regular processing.

I had a bug where I cannot open the sequencer when running under valgrind
- the
program output "Unknown SEQ default" when calling snd_seq_open. My theory is, this is caused by a SIGALRM being delivered while alsa-lib is in read() or write() or some other syscall, and none of alsa-lib handles EINTR correctly.

I fixed this by blocking SIGALRM except for when calling poll(). However, using poll() there's no way to atomically unblock a signal and enter poll() - that's what pselect is for. However, the snd_*_poll_descriptors-style API makes it hard to use select/pselect, so I'm forced to implement it in a way that's not 100%
free of race conditions.

My request: please add a way to use select/pselect with ALSA.
======================================================================

----------------------------------------------------------------------
phunge - 02-14-05 11:04
----------------------------------------------------------------------
I didn't think of that - that will work fine. This bug is a non-issue.

Thanks for the info.

----------------------------------------------------------------------
tiwai - 02-14-05 16:09
----------------------------------------------------------------------
OK, closing now.

Issue History
Date Modified Username Field Change
======================================================================

02-09-05 16:11 phunge         New Issue                                    
02-09-05 17:12 tiwai          Note Added: 0003557                          
02-14-05 11:04 phunge         Note Added: 0003588                          
02-14-05 16:09 tiwai          Status                   new => resolved     
02-14-05 16:09 tiwai          Resolution               open => not an issue
02-14-05 16:09 tiwai          Assigned To               => tiwai           
02-14-05 16:09 tiwai          Note Added: 0003591                          

======================================================================

-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click