/*
- * Copyright (c) 2009, 2010 Nicira Networks.
+ * Copyright (c) 2009, 2010, 2011 Nicira Networks.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
#if USE_LINKER_SECTIONS
#define COVERAGE_DEFINE(COUNTER) \
COVERAGE_DEFINE__(COUNTER); \
+ extern struct coverage_counter *counter_ptr_##COUNTER; \
struct coverage_counter *counter_ptr_##COUNTER \
__attribute__((section("coverage"))) = &counter_##COUNTER
#else
/* Implementation detail. */
#define COVERAGE_DEFINE__(COUNTER) \
+ extern struct coverage_counter counter_##COUNTER; \
struct coverage_counter counter_##COUNTER = { #COUNTER, 0, 0 }
#endif /* coverage.h */
/*
- * Copyright (c) 2010 Nicira Networks.
+ * Copyright (c) 2010, 2011 Nicira Networks.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
#if USE_LINKER_SECTIONS
#define STRESS_OPTION(NAME, DESCRIPTION, RECOMMENDED, MIN, MAX, DEFAULT) \
STRESS_OPTION__(NAME, DESCRIPTION, RECOMMENDED, MIN, MAX, DEFAULT); \
+ extern struct stress_option *stress_option_ptr_##NAME; \
struct stress_option *stress_option_ptr_##NAME \
__attribute__((section("stress_options"))) = &stress_##NAME
#else
/* Implementation details. */
#define STRESS_OPTION__(NAME, DESCRIPTION, RECOMMENDED, MIN, MAX, DEFAULT) \
+ extern struct stress_option stress_##NAME; \
struct stress_option stress_##NAME = \
{ #NAME, DESCRIPTION, RECOMMENDED, MIN, MAX, DEFAULT, \
DEFAULT ? DEFAULT : 0, /* period */ \
#if USE_LINKER_SECTIONS
#define VLOG_DEFINE_MODULE(MODULE) \
VLOG_DEFINE_MODULE__(MODULE) \
+ extern struct vlog_module *vlog_module_ptr_##MODULE; \
struct vlog_module *vlog_module_ptr_##MODULE \
__attribute__((section("vlog_modules"))) = &VLM_##MODULE
#else
} while (0)
#define VLOG_DEFINE_MODULE__(MODULE) \
+ extern struct vlog_module VLM_##MODULE; \
struct vlog_module VLM_##MODULE = \
{ \
#MODULE, /* name */ \