ALSA locking bug...

Jeff Garzik (jgarzik@mandrakesoft.com)
Sat, 16 Feb 2002 03:48:46 -0500


Andrew spotted this one... ALSA needs to be using a standard kernel
primitive... semaphore maybe? :)

include/sound/core.h:
> static inline void snd_power_lock(snd_card_t *card, int can_schedule)
> {
> while (test_and_set_bit(0, &card->power_lock)) {
> if (can_schedule) {
> set_current_state(TASK_INTERRUPTIBLE);
> schedule_timeout(1);
> }
> }
> }

Thanks much for all the ALSA work, as a [former] audio driver hacker, it
is a relief in many ways :)

Jeff

-- 
Jeff Garzik      | "Why is it that attractive girls like you
Building 1024    |  always seem to have a boyfriend?"
MandrakeSoft     | "Because I'm a nympho that owns a brewery?"
                 |             - BBC TV show "Coupling"
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/