FreeBSD/sys/dev/netmap/netmap_monitor.c
/* nm_sync callback for the monitor's own rx rings.
 * Note that the lock in netmap_zmon_parent_sync only protects
 * writers among themselves. Synchronization between writers
 * (i.e., netmap_zmon_parent_txsync and netmap_zmon_parent_rxsync)
 * and readers (i.e., netmap_zmon_rxsync) relies on memory barriers.
 */
nm_sync callback for the monitor's own rx rings.
Note that the lock in netmap_zmon_parent_sync only protects
writers among themselves. Synchronization between writers

and readers  relies on memory barriers.
nm_sync callback for the monitor ' s own rx rings . Note that the lock in netmap_zmon_parent_sync only protects writers among themselves . Synchronization between writers and readers relies on memory barriers .
static int
netmap_monitor_rxsync(struct netmap_kring *kring, int flags)
{
        ND("%s %x", kring->name, flags);
	kring->nr_hwcur = kring->rcur;
	mb();
        return 0;
}
static int netmap_monitor_rxsync ( struct netmap_kring * kring , int flags ) { ND ( " " , kring -> name , flags ) ; kring -> nr_hwcur = kring -> rcur ; mb ( ) ; return 0 ; }
nm_sync callback for the monitor's own rx rings.
nm_sync callback for the monitor ' s own rx rings .