df53b16fca
Before this change, we have the kernel's sigaction in the uapi headers, and our own sigaction in <bits/signal_types.h> and we rely on callers making sure to use `#define` to move the kernel type out of the way if they include a uapi header directly. This is obviously error-prone and undesireable, and not what we usually do now. What we _usually_ do now is use the header scrubber's ability to replace a struct definition with a `#include <bits/STRUCT.h>`, but that doesn't work here because struct sigaction relies on a lot of other types, some of which also come from uapi headers. So instead use our second best trick, which is to "move the kernel struct out of the way" at header scrubbing time instead. This means that someone who does `#include <linux/signal.h>` or `#include <asm/signal.h>` won't get `struct sigaction` (they'll only have `struct __kernel_sigaction` instead), but it does mean that they can't get two incompatible definitions if they include a uapi header both directly and indirectly. So although this doesn't do what I'd set out to do, it's still an improvement in some cases, and it's our preferred idiom in most cases anyway. (I'll come back once this is in to tidy up the two other kernel structs where we're still using the deprecated "rename out of the way using #define" trick, but this change is already hairy enough, and there's a possibility it will break code that didn't care that it was getting the kernel `struct sigaction` rather than the userspace one.) Bug: http://b/236042740 Test: treehugger Change-Id: Icff50e330c09c587e8f77ba0fb7cffffd9c3b708 |
||
---|---|---|
.. | ||
clean_header.py | ||
cpp.py | ||
defaults.py | ||
generate_uapi_headers.sh | ||
kernel.py | ||
update_all.py | ||
utils.py |