* header.c (WriteServerHeader): Emit a x_server_routine that can be inlined. * server.c (WriteEpilog): Export the x_routines array so it can be used from the inlined x_server_routine. --- header.c | 8 ++++++++ server.c | 2 +- 2 files changed, 9 insertions(+), 1 deletion(-)
diff --git a/header.c b/header.c index 1bc570f..e2aae9f 100644 --- a/header.c +++ b/header.c @@ -170,6 +170,14 @@ WriteServerHeader(FILE *file, const statement_t *stats) fatal("WriteServerHeader(): bad statement_kind_t (%d)", (int) stat->stKind); } + fprintf(file, "\n"); + + /* + * Include the x_server_routine function so it can be inlined. + */ + fprintf(file, "extern mig_routine_t %s_routines[];\n", ServerDemux); + WriteSubsystemServerRoutine(file, "extern inline"); + WriteEpilog(file, protect); } diff --git a/server.c b/server.c index db315fa..2f0be23 100644 --- a/server.c +++ b/server.c @@ -161,7 +161,7 @@ WriteEpilog(FILE *file, const statement_t *stats) /* * First, the symbol table */ - fprintf(file, "static mig_routine_t %s_routines[] = {\n", ServerDemux); + fprintf(file, "mig_routine_t %s_routines[] = {\n", ServerDemux); WriteArrayEntries(file, stats); -- 1.7.10.4