|
From: Jake H. <jh...@an...> - 2004-10-16 20:25:38
|
As discussed recently on syllable-developer (in the "LiveCD 0.5.4 Aterm problems" thread), the atomic primitives in Syllable badly needed updating for SMP safety. Based on a suggestion by Daniel Gryniewicz, I replaced the primitives in atheos/atomic.h with versions based on Linux 2.6.8's include/asm-i386/atomic.h. Many locations in the kernel needed to be patched, but the patches were generally minor. Also, I replaced occurrences of atomic_add(&foo, 1) and atomic_add(&foo, -1) with atomic_inc(&foo) and atomic_dec(&foo), which are slightly faster and more self-explanatory. I also fixed a few typos and changed kernel/debug.c to use ints instead of floats. Amazingly, the new kernel appears to run okay on my VMware setup, although I don't have an SMP installation to test on, and so this should be considered highly experimental. I still need to patch the drivers and there may be other code that is broken by this change. Fortunately, the size of atomic_t stayed the same so new and old code should interoperate. If you have any trouble with the bz2'd attachment, I can make the patches available for download. Enjoy! -- Jake Hamby |