ALSA locking bug...

From: Jeff Garzik (jgarzik@mandrakesoft.com)
Date: Sat Feb 16 2002 - 03:48:46 EST


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/



This archive was generated by hypermail 2b29 : Sat Feb 23 2002 - 21:00:10 EST