And here you've the race:
kernel: user:
++flag;
wmb();
counter += delta; (first 32 bits)
counter = *p_counter;
counter += delta; (last 32 bits)
wmb();
--flag;
wmb();
... *p_flag test
++flag;
counter += delta; (first 32 bits)
counter == *p_counter test
counter += delta; (last 32 bits)
wmb();
--flag;
wmb();
Improbable but theoretically possible.
-- Abramo Bagnara mailto:abramo@alsa-project.orgOpera Unica Phone: +39.546.656023 Via Emilia Interna, 140 48014 Castel Bolognese (RA) - Italy
ALSA project is http://www.alsa-project.org sponsored by SuSE Linux http://www.suse.com
It sounds good! - 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/