Atomic context and kernel API design
Posted Mar 25, 2008 22:51 UTC (Tue) by jd
In reply to: Atomic context and kernel API design
Parent article: Atomic context and kernel API design
Perhaps instead of changing the name, change the macro so that it means what it says at all levels. Different calling files set a different value to some symbol, which indicates to the header which type of atomic context you're thinking about.
Then all you need do is ensure that (a) there's a way to know whether the context is atomic or not, and (b) the same method is used across that file and across any includes that may be brought in by that file.
Alternatively, you could have two parallel kernels, one always atomic, the other always not. Then you'd never need to test at all. Although you would have the communications problem from hell that all parallel solutions suffer from.
to post comments)