bug-hurd
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH 5/5] Generate a x_server_routine in the sheader so it can be inli


From: Justus Winter
Subject: [PATCH 5/5] Generate a x_server_routine in the sheader so it can be inlined
Date: Mon, 2 Dec 2013 10:58:19 +0100

* 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




reply via email to

[Prev in Thread] Current Thread [Next in Thread]