[ovs-dev] [PATCH 1/2] compiler: Document OVS_CONSTRUCTOR.
Ben Pfaff
blp at ovn.org
Wed Feb 10 23:43:21 UTC 2016
Signed-off-by: Ben Pfaff <blp at ovn.org>
---
include/openvswitch/compiler.h | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/include/openvswitch/compiler.h b/include/openvswitch/compiler.h
index 382b668..f13f315 100644
--- a/include/openvswitch/compiler.h
+++ b/include/openvswitch/compiler.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2008, 2009, 2010, 2011, 2012, 2013, 2014 Nicira, Inc.
+ * Copyright (c) 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2016 Nicira, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -194,6 +194,13 @@
#define OVS_ALIGNED_STRUCT(N, TAG) __declspec(align(N)) struct TAG
#endif
+/* Supplies code to be run at startup time before invoking main().
+ * Use as:
+ *
+ * OVS_CONSTRUCTOR(my_constructor) {
+ * ...some code...
+ * }
+ */
#ifdef _MSC_VER
#define CCALL __cdecl
#pragma section(".CRT$XCU",read)
--
2.1.3
More information about the dev
mailing list