From 08e50968df0e5111fcdc9013355eb6edf68c2550 Mon Sep 17 00:00:00 2001 From: Ben Pfaff Date: Wed, 10 Feb 2016 15:43:21 -0800 Subject: [PATCH] compiler: Document OVS_CONSTRUCTOR. Signed-off-by: Ben Pfaff Acked-by: Russell Bryant --- 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 382b66819..f13f315fc 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.20.1