Merge branch 'mainstream'
[sliver-openvswitch.git] / ovsdb / ovsdb-idlc.in
index 1f21950..ec1c655 100755 (executable)
@@ -18,6 +18,7 @@ def annotateSchema(schemaFile, annotationFile):
     schemaJson = ovs.json.from_file(schemaFile)
     execfile(annotationFile, globals(), {"s": schemaJson})
     ovs.json.to_stream(schemaJson, sys.stdout)
+    sys.stdout.write('\n')
 
 def constify(cType, const):
     if (const and cType.endswith('*') and not cType.endswith('**')):
@@ -186,6 +187,7 @@ def printCIDLSource(schemaFile):
 #include <config.h>
 #include %s
 #include <limits.h>
+#include "ovs-thread.h"
 #include "ovsdb-data.h"
 #include "ovsdb-error.h"
 #include "util.h"
@@ -642,6 +644,7 @@ void
     if (inited) {
         return;
     }
+    assert_single_threaded();
     inited = true;
 """ % prefix
     for tableName, table in sorted(schema.tables.iteritems()):