/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License (the "License").
* You may not use this file except in compliance with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* See the License for the specific language governing permissions
* and limitations under the License.
*
* When distributing Covered Code, include this CDDL HEADER in each
* file and include the License file at usr/src/OPENSOLARIS.LICENSE.
* If applicable, add the following below this CDDL HEADER, with the
* fields enclosed by brackets "[]" replaced with your own identifying
* information: Portions Copyright [yyyy] [name of copyright owner]
*
* CDDL HEADER END
*/
/*
* Copyright 2009 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
#include <strings.h>
#include <limits.h>
#include <alloca.h>
#include <fmd_alloc.h>
#include <fmd_string.h>
#include <fmd_module.h>
#include <fmd_dispq.h>
#include <fmd_subr.h>
#include <fmd.h>
static fmd_dispqelem_t *
{
return (dep);
}
static void
{
fmd_dispqelem_t *p, *q;
uint_t i;
}
for (i = 0; i < dep->dq_hashlen; i++) {
q = p->dq_link;
}
}
}
static fmd_dispqelem_t *
{
break;
}
return (dep);
}
fmd_dispq_create(void)
{
return (dqp);
}
void
{
}
static fmd_dispqelem_t *
{
break;
}
}
return (ep);
}
void
{
}
static void
{
else
break;
}
if (patc > 1) {
} else {
else
break;
}
}
}
}
}
void
{
int patc = 0;
if (patc != 0) {
}
}
static uint_t
{
uint_t n = 0;
continue; /* event already queued for this group ID */
}
return (n);
}
/*
* This function handles the descent of the dispatch queue hash tree on behalf
* of fmd_dispq_dispatch(). We recursively descend the tree along two paths:
* one using the next component of the split class string (stored in cv[0]) and
* one using the wildcard "*" in place of cv[0]. If we can't find either one,
* our descent stops. If we descend far enough to consume cv[] (i.e. cc == 0),
* then we have a match and we dispatch the event to all modules at that level.
* We also dispatch the event to modules found at any interior "*" element,
* allowing a subscription to "a.*" to match "a.b", "a.b.c", and so on.
*/
static uint_t
{
uint_t n = 0;
if (cc == 0)
return (n);
}
static uint_t
{
char *p, *q;
return (cc);
}
void
{
/*
* If the event is a protocol list.suspect event with one or more
* events contained inside of it, determine the maximum length of all
* class strings that will be used in this dispatch operation.
*/
}
}
}
/*
* With dq_lock held as reader, allocate a bitmap on the stack for
* group IDs for this dispatch, zero it, and then do the dispatch.
*/
/*
* If we are dispatching to only a single gid, set all bits in the
* group IDs mask and then clear only the bit for the specified gid.
*/
if (gid >= 0) {
for (i = 0; i < glen; i++)
gids[i] = BT_ULMAXMASK;
}
}
}
/*
* If the total subscriptions matched (n) was zero and we're not being
* called for a single gid, send the event to the self-diagnosis module.
*/
}
void
{
}
{
return (gid);
}
void
{
}