Lines Matching defs:to

4  * The contents of this file are subject to the terms of the
24 * Use is subject to license terms.
28 * The SNMP picl plugin connects to the agent on the SP and creates
68 * and the 'rebuild_tree' flag below are both initialized to B_TRUE to
77 * to only when the flag is B_TRUE.
94 * rebuild_tree has to be initialized to B_TRUE to let the tree_builder
105 * queue and processes jobs from it to keep cache entries from expiring. It
106 * attempts to run in cycles of CACHE_REFRESH_CYCLE seconds each, first
111 * NOTE: By using a thread to keep the SNMP cache refreshed in the background,
112 * we are both adding load to the system and reducing the system's ability to
115 * performance, it may be desirable in the future to move this work into the
117 * sun4v config currently available (Batoka), they may need to be revisited for
350 * integral to the proper function of the plugin. If we fail to create
376 * since we're about to recycle the plug-in. No need to worry
393 /* wake up the tree_builder thread, tell it to exit */
400 /* send SIGUSR1 to get tree_builder out of a blocked system call */
423 * Nothing to do here.
425 * system call to return EINTR. This is used to trigger early exit from
427 * would be required to allow early exit if the tree builder thread is
443 * catch SIGUSR1 to allow early exit from snmp_init which may block
480 LOGPRINTF("tree_builder: check whether to rebuild subtree\n");
488 LOGPRINTF("tree_builder: time to exit\n");
534 LOGPRINTF("tree_builder: setting stale_tree to FALSE\n");
539 LOGPRINTF("tree_builder: setting rebuild_tree to FALSE\n");
596 * happened and we need to throw away everything
713 * created first; if there's no parent, then parent it to the
1022 * doing this in response to a hotplug event, we should've freed the
1023 * old physplat_nodes before entering here to save the first node of the
1067 * subtree, whether for the first time or in response to a hotplug event.
1069 * to be B_TRUE, so no one else would be accessing vol_props, n_vol_props
1070 * or volprop_ndx. If we're here to build the tree for the first time,
1117 * Check if some other thread beat us to it
1125 * Cache OID_entLastChangeTime for up to 10 seconds before
1150 * If we can't read entLastChangeTime we assume we need to rebuild
1151 * the tree. This will also cover the case when we need to rebuild
1158 * If the mib data has changed, we need to rebuild the physical-platform
1159 * subtree. To do this, we set a flag to mark the tree stale,
1160 * so that any future reads to get value of volatile properties will
1183 * it needs to fetch the value of a volatile property. The first thing we
1184 * must do, however, is to see if there has been a hotplug or a link-reset
1185 * event since the last time we built the tree and whether we need to
1186 * rebuild the tree. If so, we do whatever is necessary to make that happen,
1228 * due to a link reset, between the check for stale data and now,
1430 * This mask prevents us from attempting to fetch thresholds
1431 * which don't apply to the sensor or that aren't there anyway,
1433 * takes several seconds to time out.
1441 * The ALOM snmp agent doesn't adhere to the BER rules for
1552 * Add the specified string property to the node
1581 * Add the specified void property to the node
1903 * process refresh job to prevent cache entries from expiring.
1911 timestruc_t to;
1931 * 1) we are told to exit, or
1951 * As long as we haven't been told to exit, sleep for
1954 * equal to or greater than 60 seconds, skip sleeping entirely.
1959 to.tv_sec = CACHE_REFRESH_CYCLE - cycle_elapsed;
1960 to.tv_nsec = 0;
1962 &cache_refresh_lock, &to);
1966 * If we have been told to exit, clean up and bail out.
1971 LOGPRINTF("cache_refresher: time to exit\n");
1982 * Check to see if the cache_refresher thread is running. If it is, signal it
1983 * to terminate and clean up associated data structures.
1988 /* if the thread isn't running, there is nothing to do */
1992 /* wake up the cache_refresher thread, tell it to exit */