static void time_timespec__(struct clock *c, struct timespec *ts) { bool slow_path; time_init(); atomic_read_relaxed(&c->slow_path, &slow_path); if (!slow_path) { xclock_gettime(c->id, ts); } else { struct timespec warp; struct timespec cache; bool stopped; ovs_mutex_lock(&c->mutex); stopped = c->stopped; warp = c->warp; cache = c->cache; ovs_mutex_unlock(&c->mutex); if (!stopped) { xclock_gettime(c->id, &cache); } timespec_add(ts, &cache, &warp); } }
static bool ipf_get_v6_enabled(struct ipf *ipf) { bool ifp_v6_enabled_; atomic_read_relaxed(&ipf->ifp_v6_enabled, &ifp_v6_enabled_); return ifp_v6_enabled_; }