X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=lib%2Fstress.h;h=9d6ea97f0793ae4d8e20c998621e8390bfec224f;hb=153e54814d81cafa89bae451dbfa92a31910e5a6;hp=4244fca9b43ccdeebbdd2162dadce0ccef312db8;hpb=cc01d0bb79103a01aa0afc3484249fd518b877ea;p=openvswitch diff --git a/lib/stress.h b/lib/stress.h index 4244fca9..9d6ea97f 100644 --- a/lib/stress.h +++ b/lib/stress.h @@ -1,5 +1,5 @@ /* - * 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. @@ -60,6 +60,7 @@ struct stress_option { #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 @@ -76,6 +77,7 @@ void stress_init_command(void); /* 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 */ \