FreeBSD/sys/dev/bxe/ecore_sp.c
/**
 * __ecore_vlan_mac_h_read_unlock - unlock the vlan mac head list reader lock
 *
 * @sc:			device handle
 * @o:			vlan_mac object
 *
 * @details Should be called under execution queue lock. Notice if a pending
 *          execution exists, it would be performed if this was the last
 *          reader. possibly releasing and reclaiming the execution queue lock.
 */
unlock the vlan mac head list reader lock
@sc:                 device handle
@o:                  vlan_mac object

@details Should be called under execution queue lock. Notice if a pending
execution exists, it would be performed if this was the last
reader. possibly releasing and reclaiming the execution queue lock.
unlock the vlan mac head list reader lock @sc : device handle @o : vlan_mac object @details Should be called under execution queue lock . Notice if a pending execution exists it would be performed if this was the last reader . possibly releasing and reclaiming the execution queue lock .
static void __ecore_vlan_mac_h_read_unlock(struct bxe_softc *sc,
					  struct ecore_vlan_mac_obj *o)
{
	if (!o->head_reader) {
		ECORE_ERR("Need to release vlan mac reader lock, but lock isn't taken\n");
#ifdef ECORE_STOP_ON_ERROR
		ecore_panic();
#endif
	} else {
		o->head_reader--;
		ECORE_MSG(sc, "vlan_mac_lock - decreased readers to %d\n",
			  o->head_reader);
	}
	if (!o->head_reader && o->head_exe_request) {
		ECORE_MSG(sc, "vlan_mac_lock - reader release encountered a pending request\n");
		__ecore_vlan_mac_h_write_unlock(sc, o);
	}
}
static void __ecore_vlan_mac_h_read_unlock ( struct bxe_softc * sc , struct ecore_vlan_mac_obj * o ) { if ( ! o -> head_reader ) { ECORE_ERR ( " \n " ) ; #ifdef ECORE_STOP_ON_ERROR ecore_panic ( ) ; #endif } else { o -> head_reader -- ; ECORE_MSG ( sc , " \n " , o -> head_reader ) ; } if ( ! o -> head_reader && o -> head_exe_request ) { ECORE_MSG ( sc , " \n " ) ; __ecore_vlan_mac_h_write_unlock ( sc , o ) ; } }
__ecore_vlan_mac_h_read_unlock - unlock the vlan mac head list reader lock
 @sc:                 device handle
 @o:                  vlan_mac object
__ecore_vlan_mac_h_read_unlock - unlock the vlan mac head list reader lock @sc : device handle @o : vlan_mac object
/* It's possible a new pending execution was added, and that this reader
	 * was last - if so we need to execute the command.
	 */ /* Writer release will do the trick */