vldc_impl.h revision 4d39be2b45b5ac811d28452e6eb629ac64aebfc4
/*
* 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 2006 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
#ifndef _VLDC_IMPL_H
#define _VLDC_IMPL_H
#pragma ident "%Z%%M% %I% %E% SMI"
#ifdef __cplusplus
extern "C" {
#endif
/* default values */
/* VLDC limits */
#define VLDC_MAX_PORTS 0x800
#define VLDC_MAX_MINORS VLDC_MAX_PORTS
#define VLDC_INST_SHIFT 11
#define VLDC_HVCTL_SVCNAME "hvctl"
/* get port number from minor number */
/* get minor table entry from minor number */
/* get instance number from minor number */
/* indicates an invalid port number */
/* delay(in us) used to wait for pending callback to complete */
/*
* Minor node number to port number mapping table.
*
* The lock field in the vldc_minor structure is used to serialize operations
* on the port associated with the minor node. It also protects the minor node
* in_use field which is used to track the number of active users of the minor
* node. Driver ops will either hold the lock over the whole operation or
* will increment (and then decrement) the in use count if they need to
* release and re-acquire the lock, e.g. when copying data in from or out to
* userland. When the MDEG framework calls into the driver via the callback to
* remove a port, the driver must wait until the in use count for the minor
* node associated with the port drops to zero, before it can remove the
* port.
*/
typedef struct vldc_minor {
} vldc_minor_t;
typedef struct vldc_port {
} vldc_port_t;
/*
* vldc driver's soft state structure
*/
typedef struct vldc {
/* table for assigned minors */
/* number of minors already assigned */
} vldc_t;
#ifdef __cplusplus
}
#endif
#endif /* _VLDC_IMPL_H */