geom_event.c (93250) | geom_event.c (93774) |
---|---|
1/*- 2 * Copyright (c) 2002 Poul-Henning Kamp 3 * Copyright (c) 2002 Networks Associates Technology, Inc. 4 * All rights reserved. 5 * 6 * This software was developed for the FreeBSD Project by Poul-Henning Kamp 7 * and NAI Labs, the Security Research Division of Network Associates, Inc. 8 * under DARPA/SPAWAR contract N66001-01-C-8035 ("CBOSS"), as part of the --- 18 unchanged lines hidden (view full) --- 27 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 28 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 29 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 30 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 31 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 32 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 33 * SUCH DAMAGE. 34 * | 1/*- 2 * Copyright (c) 2002 Poul-Henning Kamp 3 * Copyright (c) 2002 Networks Associates Technology, Inc. 4 * All rights reserved. 5 * 6 * This software was developed for the FreeBSD Project by Poul-Henning Kamp 7 * and NAI Labs, the Security Research Division of Network Associates, Inc. 8 * under DARPA/SPAWAR contract N66001-01-C-8035 ("CBOSS"), as part of the --- 18 unchanged lines hidden (view full) --- 27 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 28 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 29 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 30 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 31 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 32 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 33 * SUCH DAMAGE. 34 * |
35 * $FreeBSD: head/sys/geom/geom_event.c 93250 2002-03-26 22:07:38Z phk $ | 35 * $FreeBSD: head/sys/geom/geom_event.c 93774 2002-04-04 09:41:47Z phk $ |
36 */ 37 38/* 39 * XXX: How do we in general know that objects referenced in events 40 * have not been destroyed before we get around to handle the event ? 41 */ 42 43#include <sys/param.h> --- 106 unchanged lines hidden (view full) --- 150 g_trace(G_T_TOPOLOGY, "g_do_event(%p) %d m:%p g:%p p:%p c:%p - ", 151 ep, ep->event, ep->class, ep->geom, ep->provider, ep->consumer); 152 g_topology_assert(); 153 switch (ep->event) { 154 case EV_NEW_CLASS: 155 mp2 = ep->class; 156 if (mp2->taste == NULL) 157 break; | 36 */ 37 38/* 39 * XXX: How do we in general know that objects referenced in events 40 * have not been destroyed before we get around to handle the event ? 41 */ 42 43#include <sys/param.h> --- 106 unchanged lines hidden (view full) --- 150 g_trace(G_T_TOPOLOGY, "g_do_event(%p) %d m:%p g:%p p:%p c:%p - ", 151 ep, ep->event, ep->class, ep->geom, ep->provider, ep->consumer); 152 g_topology_assert(); 153 switch (ep->event) { 154 case EV_NEW_CLASS: 155 mp2 = ep->class; 156 if (mp2->taste == NULL) 157 break; |
158 LIST_FOREACH(mp, &g_classs, class) { | 158 LIST_FOREACH(mp, &g_classes, class) { |
159 if (mp2 == mp) 160 continue; 161 LIST_FOREACH(gp, &mp->geom, geom) { 162 LIST_FOREACH(pp, &gp->provider, provider) { 163 mp2->taste(ep->class, pp, 0); 164 g_topology_assert(); 165 } 166 } 167 } 168 break; 169 case EV_NEW_PROVIDER: 170 g_trace(G_T_TOPOLOGY, "EV_NEW_PROVIDER(%s)", 171 ep->provider->name); | 159 if (mp2 == mp) 160 continue; 161 LIST_FOREACH(gp, &mp->geom, geom) { 162 LIST_FOREACH(pp, &gp->provider, provider) { 163 mp2->taste(ep->class, pp, 0); 164 g_topology_assert(); 165 } 166 } 167 } 168 break; 169 case EV_NEW_PROVIDER: 170 g_trace(G_T_TOPOLOGY, "EV_NEW_PROVIDER(%s)", 171 ep->provider->name); |
172 LIST_FOREACH(mp, &g_classs, class) { | 172 LIST_FOREACH(mp, &g_classes, class) { |
173 if (mp->taste == NULL) 174 continue; 175 i = 1; 176 LIST_FOREACH(cp, &ep->provider->consumers, consumers) 177 if(cp->geom->class == mp) 178 i = 0; 179 if (i) { 180 mp->taste(mp, ep->provider, 0); --- 120 unchanged lines hidden --- | 173 if (mp->taste == NULL) 174 continue; 175 i = 1; 176 LIST_FOREACH(cp, &ep->provider->consumers, consumers) 177 if(cp->geom->class == mp) 178 i = 0; 179 if (i) { 180 mp->taste(mp, ep->provider, 0); --- 120 unchanged lines hidden --- |