The recommended kernel header, provided by PreOS, is kernel.h. I can see that:
* kernel.h is intended to be used without using any of the headers that tigcclib.h includes: kernel.h duplicates more than one thousand lines of vat.h, alloc.h, etc.. No modifications for the vast majority of the definitions, starting with the ROM_CALLs: _rom_call(...) is used in both tigcclib.h-#include'd headers and kernel.h, the change is within the definition of _rom_call(...).
* kernel.h duplicates the definitions of the tigcc.a functions.
* kernel.h has different ordering for the definitions.
I'm therefore asking myself several questions:
* why this choice of not using the tigcclib.h-#include'd headers at all ? Out of necessity maybe ?
(Maybe Kevin had threatened, like he did for the ExtGraph grayscale routine, to change something in TIGCC to make it harder to use software that he doesn't like. He never turned his threats into actions, maybe he knows that this kind of stupidities was one of the ways to trigger a fork of TIGCC.
* is kernel.h auto-generated, at least a part of it ?
* if kernel.h isn't auto-generated, would it be possible to auto-generate a significant part of it ? I'm mostly thinking of not duplicating 1:1 the definitions of vat.h, alloc.h, etc.
My goal is not to point that Patrick, when making kernel.h the way it is, was wrong. I'm just trying to understand: I'm no kernel-based programming expert (
