bus_func.c revision 7c478bd95313f5f23a4c958a745db2134aa03244
2N/A * The contents of this file are subject to the terms of the 2N/A * Common Development and Distribution License, Version 1.0 only 2N/A * (the "License"). You may not use this file except in compliance 2N/A * See the License for the specific language governing permissions 2N/A * and limitations under the License. 2N/A * When distributing Covered Code, include this CDDL HEADER in each 2N/A * If applicable, add the following below this CDDL HEADER, with the 2N/A * fields enclosed by brackets "[]" replaced with your own identifying 2N/A * information: Portions Copyright [yyyy] [name of copyright owner] 2N/A * Copyright 2003 Sun Microsystems, Inc. All rights reserved. 2N/A * Use is subject to license terms. 2N/A#
pragma ident "%Z%%M% %I% %E% SMI" 2N/A * Register a new bus function. We expect this function to be called from a 2N/A * driver attach or detach routine, so we can safely perform a sleeping 2N/A * allocation here. We just insert the new element at the head of the list. 2N/A * Unregister the specified bus function. We only delete an element that 2N/A * exactly matches the specified (type, func, arg) tuple. We expect this 2N/A * function to only be called from driver detach context. 2N/A * Invoke the registered bus functions of the specified type. We return the 2N/A * maximum of the result values (e.g. BF_FATAL if any call returned BF_FATAL). 2N/A * This function assumes that (1) the BF_* constants are defined so that the 2N/A * most fatal error has the highest numerical value, and (2) that the bf_func