Add [process|thread] [init|finish] functions to modules

The MXS_MODULDE object now contains optinal pointers for functions
to be called att process and thread startup and shutdown. Since the
functions were added to the end, strictly speaking, all structures
would not have needed to have been modified, but better to be
explicit. In a subsequent change, these will be called.

C++ does not support flexible arrays, so for the time being C++
modules are restricted to 10 parameters. Better approach is to
factor out the parameters to a separate array and then just store
a pointer to that array in MXS_MODULE.
This commit is contained in:
Johan Wikman
2017-01-05 11:25:51 +02:00
parent 6a695c9407
commit a2a38f952a
49 changed files with 400 additions and 58 deletions

View File

@ -89,7 +89,14 @@ MXS_MODULE* MXS_CREATE_MODULE()
ROUTER_VERSION,
"The admin user interface",
"V1.0.0",
&MyObject
&MyObject,
NULL, /* Process init. */
NULL, /* Process finish. */
NULL, /* Thread init. */
NULL, /* Thread finish. */
{
{MXS_END_MODULE_PARAMS}
}
};
return &info;