summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
bd3950d)
This commit changes the code such that arguments to thread-safety
macros are not ampersanded.
Signed-off-by: Alex Wang <alexw@nicira.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
static struct hmap *const all_bfds OVS_GUARDED_BY(mutex) = &all_bfds__;
static bool bfd_forwarding__(const struct bfd *) OVS_REQUIRES(mutex);
static struct hmap *const all_bfds OVS_GUARDED_BY(mutex) = &all_bfds__;
static bool bfd_forwarding__(const struct bfd *) OVS_REQUIRES(mutex);
-static bool bfd_in_poll(const struct bfd *) OVS_REQUIRES(&mutex);
-static void bfd_poll(struct bfd *bfd) OVS_REQUIRES(&mutex);
-static const char *bfd_diag_str(enum diag) OVS_REQUIRES(&mutex);
-static const char *bfd_state_str(enum state) OVS_REQUIRES(&mutex);
-static long long int bfd_min_tx(const struct bfd *) OVS_REQUIRES(&mutex);
+static bool bfd_in_poll(const struct bfd *) OVS_REQUIRES(mutex);
+static void bfd_poll(struct bfd *bfd) OVS_REQUIRES(mutex);
+static const char *bfd_diag_str(enum diag) OVS_REQUIRES(mutex);
+static const char *bfd_state_str(enum state) OVS_REQUIRES(mutex);
+static long long int bfd_min_tx(const struct bfd *) OVS_REQUIRES(mutex);
static long long int bfd_tx_interval(const struct bfd *)
static long long int bfd_tx_interval(const struct bfd *)
static long long int bfd_rx_interval(const struct bfd *)
static long long int bfd_rx_interval(const struct bfd *)
- OVS_REQUIRES(&mutex);
-static void bfd_set_next_tx(struct bfd *) OVS_REQUIRES(&mutex);
+ OVS_REQUIRES(mutex);
+static void bfd_set_next_tx(struct bfd *) OVS_REQUIRES(mutex);
static void bfd_set_state(struct bfd *, enum state, enum diag)
static void bfd_set_state(struct bfd *, enum state, enum diag)
- OVS_REQUIRES(&mutex);
-static uint32_t generate_discriminator(void) OVS_REQUIRES(&mutex);
+ OVS_REQUIRES(mutex);
+static uint32_t generate_discriminator(void) OVS_REQUIRES(mutex);
static void bfd_put_details(struct ds *, const struct bfd *)
static void bfd_put_details(struct ds *, const struct bfd *)
static void bfd_unixctl_show(struct unixctl_conn *, int argc,
const char *argv[], void *aux OVS_UNUSED);
static void bfd_unixctl_set_forwarding_override(struct unixctl_conn *,
int argc, const char *argv[],
void *aux OVS_UNUSED);
static void log_msg(enum vlog_level, const struct msg *, const char *message,
static void bfd_unixctl_show(struct unixctl_conn *, int argc,
const char *argv[], void *aux OVS_UNUSED);
static void bfd_unixctl_set_forwarding_override(struct unixctl_conn *,
int argc, const char *argv[],
void *aux OVS_UNUSED);
static void log_msg(enum vlog_level, const struct msg *, const char *message,
- const struct bfd *) OVS_REQUIRES(&mutex);
+ const struct bfd *) OVS_REQUIRES(mutex);
static struct vlog_rate_limit rl = VLOG_RATE_LIMIT_INIT(20, 20);
static struct vlog_rate_limit rl = VLOG_RATE_LIMIT_INIT(20, 20);
-cfm_find(const char *name) OVS_REQUIRES(&mutex)
+cfm_find(const char *name) OVS_REQUIRES(mutex)
-cfm_print_details(struct ds *ds, const struct cfm *cfm) OVS_REQUIRES(&mutex)
+cfm_print_details(struct ds *ds, const struct cfm *cfm) OVS_REQUIRES(mutex)
{
struct remote_mp *rmp;
bool extended;
{
struct remote_mp *rmp;
bool extended;
}
\f
static struct lacp *
}
\f
static struct lacp *
-lacp_find(const char *name) OVS_REQUIRES(&mutex)
+lacp_find(const char *name) OVS_REQUIRES(mutex)
-lacp_print_details(struct ds *ds, struct lacp *lacp) OVS_REQUIRES(&mutex)
+lacp_print_details(struct ds *ds, struct lacp *lacp) OVS_REQUIRES(mutex)
{
struct shash slave_shash = SHASH_INITIALIZER(&slave_shash);
const struct shash_node **sorted_slaves = NULL;
{
struct shash slave_shash = SHASH_INITIALIZER(&slave_shash);
const struct shash_node **sorted_slaves = NULL;
static struct ovs_mutex mutex;
static struct list all_stps__ = LIST_INITIALIZER(&all_stps__);
static struct ovs_mutex mutex;
static struct list all_stps__ = LIST_INITIALIZER(&all_stps__);
-static struct list *const all_stps OVS_GUARDED_BY(&mutex) = &all_stps__;
+static struct list *const all_stps OVS_GUARDED_BY(mutex) = &all_stps__;
#define FOR_EACH_ENABLED_PORT(PORT, STP) \
for ((PORT) = stp_next_enabled_port((STP), (STP)->ports); \
#define FOR_EACH_ENABLED_PORT(PORT, STP) \
for ((PORT) = stp_next_enabled_port((STP), (STP)->ports); \
static struct dpif_sflow_port *
dpif_sflow_find_port(const struct dpif_sflow *ds, odp_port_t odp_port)
static struct dpif_sflow_port *
dpif_sflow_find_port(const struct dpif_sflow *ds, odp_port_t odp_port)
{
struct dpif_sflow_port *dsp;
{
struct dpif_sflow_port *dsp;
static void
sflow_agent_get_counters(void *ds_, SFLPoller *poller,
SFL_COUNTERS_SAMPLE_TYPE *cs)
static void
sflow_agent_get_counters(void *ds_, SFLPoller *poller,
SFL_COUNTERS_SAMPLE_TYPE *cs)
{
struct dpif_sflow *ds = ds_;
SFLCounters_sample_element elem;
{
struct dpif_sflow *ds = ds_;
SFLCounters_sample_element elem;
static struct vlog_rate_limit rl = VLOG_RATE_LIMIT_INIT(1, 5);
static struct vlog_rate_limit dbg_rl = VLOG_RATE_LIMIT_INIT(60, 60);
static struct vlog_rate_limit rl = VLOG_RATE_LIMIT_INIT(1, 5);
static struct vlog_rate_limit dbg_rl = VLOG_RATE_LIMIT_INIT(60, 60);
-static struct tnl_port *tnl_find(struct tnl_match *) OVS_REQ_RDLOCK(&rwlock);
+static struct tnl_port *tnl_find(struct tnl_match *) OVS_REQ_RDLOCK(rwlock);
static struct tnl_port *tnl_find_exact(struct tnl_match *)
static struct tnl_port *tnl_find_exact(struct tnl_match *)
- OVS_REQ_RDLOCK(&rwlock);
+ OVS_REQ_RDLOCK(rwlock);
static struct tnl_port *tnl_find_ofport(const struct ofport_dpif *)
static struct tnl_port *tnl_find_ofport(const struct ofport_dpif *)
- OVS_REQ_RDLOCK(&rwlock);
+ OVS_REQ_RDLOCK(rwlock);
static uint32_t tnl_hash(struct tnl_match *);
static void tnl_match_fmt(const struct tnl_match *, struct ds *);
static uint32_t tnl_hash(struct tnl_match *);
static void tnl_match_fmt(const struct tnl_match *, struct ds *);
-static char *tnl_port_fmt(const struct tnl_port *) OVS_REQ_RDLOCK(&rwlock);
+static char *tnl_port_fmt(const struct tnl_port *) OVS_REQ_RDLOCK(rwlock);
static void tnl_port_mod_log(const struct tnl_port *, const char *action)
static void tnl_port_mod_log(const struct tnl_port *, const char *action)
- OVS_REQ_RDLOCK(&rwlock);
+ OVS_REQ_RDLOCK(rwlock);
static const char *tnl_port_get_name(const struct tnl_port *)
static const char *tnl_port_get_name(const struct tnl_port *)
- OVS_REQ_RDLOCK(&rwlock);
-static void tnl_port_del__(const struct ofport_dpif *) OVS_REQ_WRLOCK(&rwlock);
+ OVS_REQ_RDLOCK(rwlock);
+static void tnl_port_del__(const struct ofport_dpif *) OVS_REQ_WRLOCK(rwlock);
static bool
tnl_port_add__(const struct ofport_dpif *ofport, const struct netdev *netdev,
odp_port_t odp_port, bool warn)
static bool
tnl_port_add__(const struct ofport_dpif *ofport, const struct netdev *netdev,
odp_port_t odp_port, bool warn)
- OVS_REQ_WRLOCK(&rwlock)
{
const struct netdev_tunnel_config *cfg;
struct tnl_port *existing_port;
{
const struct netdev_tunnel_config *cfg;
struct tnl_port *existing_port;
-discard_stats(void) OVS_REQUIRES(&mutex)
+discard_stats(void) OVS_REQUIRES(mutex)
{
if (system_stats) {
smap_destroy(system_stats);
{
if (system_stats) {
smap_destroy(system_stats);