conf.h revision e099bf07784b9aadc4cc8655e69d462397e99860
/*
* 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 (c) 1984, 1986, 1987, 1988, 1989 AT&T */
/* All Rights Reserved */
/*
* Copyright 2007 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
#ifndef _SYS_CONF_H
#define _SYS_CONF_H
#pragma ident "%Z%%M% %I% %E% SMI" /* SVr4.0 11.21 */
#include <sys/feature_tests.h>
#if !defined(_XPG4_2) || defined(__EXTENSIONS__)
#endif
#ifdef __cplusplus
extern "C" {
#endif
#if !defined(_XPG4_2) || defined(__EXTENSIONS__)
#ifdef _KERNEL
/*
* XXX Given that drivers need to include this file,
* it legitimizes (aka provides prototypes for)
*/
typedef struct fmodsw {
int f_flag;
} fmodsw_t;
extern int devcnt;
/*
* Return streams information for the driver specified by major number or
* NULL if device cb_ops structure is not present.
*/
NULL : \
extern int devi_identify(dev_info_t *);
extern int devi_probe(dev_info_t *);
/*
* The following [cb]dev_* functions are not part of the DDI, use
*/
extern int dev_to_instance(dev_t);
extern int bdev_strategy(struct buf *);
int, char *, caddr_t, int *);
#endif /* _KERNEL */
/*
* Device flags.
*
* Bit 0 to bit 15 are reserved for kernel.
* Bit 16 to bit 31 are reserved for different machines.
*/
/*
* MT-safety level (in DDI portion of flags).
*
* All drivers must be MT-safe, and must advertise this by specifying D_MP.
*
* The remainder of the flags apply only to STREAMS modules and drivers.
*
* A STREAMS driver or module can optionally select inner and outer perimeters.
* The four mutually exclusive options that define the presence and scope
* of the inner perimeter are:
* D_MTPERMOD - per module single threaded.
* D_MTQPAIR - per queue-pair single threaded.
* D_MTPERQ - per queue instance single threaded.
* (none of the above) - no inner perimeter restricting concurrency
*
* The presence of the outer perimeter is declared with:
* D_MTOUTPERIM - a per-module outer perimeter. Can be combined with
* D_MTPERQ, D_MTQPAIR, and D_MP.
*
* The concurrency when entering the different STREAMS entry points can be
* modified with:
* D_MTPUTSHARED - modifier for D_MTPERQ, D_MTQPAIR, and D_MTPERMOD
* specifying that the put procedures should not be
* single-threaded at the inner perimeter.
* _D_MTOCSHARED - EXPERIMENTAL - will be removed in a future release.
* Modifier for D_MTPERQ, D_MTQPAIR, and D_MTPERMOD
* specifying that the open and close procedures should not be
* single-threaded at the inner perimeter.
* _D_MTCBSHARED - EXPERIMENTAL - will be removed in a future release.
* Modifier for D_MTPERQ, D_MTQPAIR, and D_MTPERMOD
* specifying that the callback i.e qtimeout() procedures should
* not be single-threaded at the inner perimeter.
* _D_MTSVCSHARED - EXPERIMENTAL - will be removed in a future release.
* Modifier for D_MTPERMOD only. Specifies that the service
* procedure should not be single-threaded at the inner perimeter.
* However only a single instance of the service thread can run on
* any given queue.
* D_MTOCEXCL - modifier for D_MTOUTPERIM specifying that the open and
* close procedures should be single-threaded at the outer
* perimeter.
*/
/* 0x100 - see below */
/* 0x200 - see below */
/* 0x400 - see below */
/* The inner perimeter scope bits */
/* Inner perimeter modification bits */
/* Outer perimeter modification bits */
#define D_MTOUTER_MOD (D_MTOCEXCL)
/* All the MT flags */
/* extended qinit structure */
#endif /* !defined(_XPG4_2) || defined(__EXTENSIONS__) */
#ifdef __cplusplus
}
#endif
#endif /* _SYS_CONF_H */