-
Philippe Gerum authored
Drivers from the RTDM_COBALT class are specifically designed for extending the Cobalt/POSIX services. We need a way to expose extension-specific handlers in the latter, so that the former may change the default behavior at well-defined locations. This extension mechanism should not cause any overhead when disabled, which is the most common situation. For this reason, the extension mechanism is compiled out when CONFIG_XENO_OPT_COBALT_EXTENSION is disabled. This patch introduces the cobalt_extension abstraction, aimed at exposing a series of extension handlers as described previously, on a per-thread basis. Extension drivers should invoke the cobalt_thread_extend() and cobalt_thread_restrict() services to respectively enable and disable the handlers. At this chance, the private data field moved from the core thread object (xnthread) to the cobalt_thread structure, since this facility is intended for use by Cobalt extension code. Cobalt extension drivers should include <rtdm/cobalt.h>, which will read in the appropriate kernel headers, useful for implementing the add-on features, and interposing on the existing Cobalt services via the internal interface. Since these headers a not part of the public kernel API, drivers should mention "-Ikernel" in the ccflags-y variable from their Kbuild Makefile frag.
76d70338