FreeBSD/sys/cddl/contrib/opensolaris/uts/common/dtrace/fasttrap.c
/*
 * This function ensures that no threads are actively using the memory
 * associated with probes that were formerly live.
 */
This function ensures that no threads are actively using the memory
associated with probes that were formerly live.
This function ensures that no threads are actively using the memory associated with probes that were formerly live .
static void
fasttrap_mod_barrier(uint64_t gen)
{
	int i;
	if (gen < fasttrap_mod_gen)
		return;
	fasttrap_mod_gen++;
#ifdef illumos
	CPU_FOREACH(i) {
		mutex_enter(&fasttrap_cpuc_pid_lock[i]);
		mutex_exit(&fasttrap_cpuc_pid_lock[i]);
	}
#else
	rm_wlock(&fasttrap_tp_lock);
	rm_wunlock(&fasttrap_tp_lock);
#endif
}
static void fasttrap_mod_barrier ( uint64_t gen ) { int i ; if ( gen < fasttrap_mod_gen ) return ; fasttrap_mod_gen ++ ; #ifdef illumos CPU_FOREACH ( i ) { mutex_enter ( & fasttrap_cpuc_pid_lock [ i ] ) ; mutex_exit ( & fasttrap_cpuc_pid_lock [ i ] ) ; } #else rm_wlock ( & fasttrap_tp_lock ) ; rm_wunlock ( & fasttrap_tp_lock ) ; #endif }
This function ensures that no threads are actively using the memory
 associated with probes that were formerly live.
This function ensures that no threads are actively using the memory associated with probes that were formerly live .