compiler: Document OVS_CONSTRUCTOR.
authorBen Pfaff <blp@ovn.org>
Wed, 10 Feb 2016 23:43:21 +0000 (15:43 -0800)
committerBen Pfaff <blp@ovn.org>
Thu, 11 Feb 2016 02:08:06 +0000 (18:08 -0800)
Signed-off-by: Ben Pfaff <blp@ovn.org>
Acked-by: Russell Bryant <russell@ovn.org>
include/openvswitch/compiler.h

index 382b668..f13f315 100644 (file)
@@ -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.
 #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)