Update of /cvsroot/alsa/alsa-kernel/synth/emux In directory sc8-pr-cvs1:/tmp/cvs-serv8989/synth/emux
Modified Files: soundfont.c Log Message: Josef Jeff Sipek <[EMAIL PROTECTED]>: - fixed sleep in interrupt context. Index: soundfont.c =================================================================== RCS file: /cvsroot/alsa/alsa-kernel/synth/emux/soundfont.c,v retrieving revision 1.7 retrieving revision 1.8 diff -u -r1.7 -r1.8 --- soundfont.c 31 Jan 2003 15:21:29 -0000 1.7 +++ soundfont.c 28 Jul 2003 10:09:52 -0000 1.8 @@ -66,15 +66,11 @@ static int lock_preset(snd_sf_list_t *sflist, int nonblock) { - unsigned long flags; - spin_lock_irqsave(&sflist->lock, flags); - if (sflist->sf_locked && nonblock) { - spin_unlock_irqrestore(&sflist->lock, flags); - return -EBUSY; - } - spin_unlock_irqrestore(&sflist->lock, flags); - down(&sflist->presets_mutex); - sflist->sf_locked = 1; + if (nonblock) { + if (down_trylock(&sflist->presets_mutex)) + return -EBUSY; + } else + down(&sflist->presets_mutex); return 0; } @@ -86,7 +82,6 @@ unlock_preset(snd_sf_list_t *sflist) { up(&sflist->presets_mutex); - sflist->sf_locked = 0; } @@ -1356,7 +1351,6 @@ init_MUTEX(&sflist->presets_mutex); spin_lock_init(&sflist->lock); - sflist->sf_locked = 0; sflist->memhdr = hdr; if (callback) @@ -1403,7 +1397,7 @@ /* * Remove unlocked samples. - * The soundcard should be silet before calling this function. + * The soundcard should be silent before calling this function. */ int snd_soundfont_remove_unlocked(snd_sf_list_t *sflist) ------------------------------------------------------- This SF.Net email sponsored by: Free pre-built ASP.NET sites including Data Reports, E-commerce, Portals, and Forums are available now. Download today and enter to win an XBOX or Visual Studio .NET. http://aspnet.click-url.com/go/psa00100003ave/direct;at.aspnet_072303_01/01 _______________________________________________ Alsa-cvslog mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/alsa-cvslog