fifonode.h revision 39cba716228ed2aec9b253319bc4dbb59179b94a
/*
* 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.
*/
/* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */
/* All Rights Reserved */
#ifndef _SYS_FS_FIFONODE_H
#define _SYS_FS_FIFONODE_H
#pragma ident "%Z%%M% %I% %E% SMI" /* SVr4.0 1.15 */
#ifdef __cplusplus
extern "C" {
#endif
/*
* This is also the hierarchy
* flk_lock protects:
* fn_mp
* fn_tail
* fn_count
* fn_flag
* fn_wcnt
* fn_rcnt
* fn_open
* fn_rsynccnt
* fn_wsynccnt
* fn_wwaitcnt
* fn_atime
* fn_mtime
* fn_ctime
* fn_insync
* flk_ref
* flk_ocsync
* ftable lock protects - actually this is independent
* fifoalloc[]
* fn_nextp
* fn_backp
*/
typedef struct fifolock {
int flk_ref; /* number of fifonodes using this */
short flk_ocsync; /* sync open/close */
} fifolock_t;
typedef struct fifonode fifonode_t;
struct fifonode {
int fn_insync;
};
typedef struct fifodata {
} fifodata_t;
/*
* Valid flags for fifonodes.
*/
/*
* process waiting on poll read on band data
* this can only occur if we go to streams
* mode
*/
#define FIFOPOLLRBAND 0x20000
#define FIFOLOWAT (0)
/*
* Macros to convert a vnode to a fifnode, and vice versa.
*/
#if defined(_KERNEL)
/*
* Fifohiwat defined as a variable is to allow tuning of the high
* water mark if needed. It is not meant to be released.
*/
#if FIFODEBUG
extern int Fifohiwat;
#else /* FIFODEBUG */
#endif /* FIFODEBUG */
extern struct vnodeops *fifo_vnodeops;
extern const struct fs_operation_def fifo_vnodeops_template[];
extern struct kmem_cache *fnode_cache;
extern struct kmem_cache *pipe_cache;
struct vfssw;
struct queue;
extern int fifoinit(int, char *);
extern void fifo_cleanup(vnode_t *, int);
extern void fiforemove(fifonode_t *);
extern void fifo_fastflush(fifonode_t *);
extern void fifo_vfastoff(vnode_t *);
extern void fifo_fastoff(fifonode_t *);
extern struct streamtab *fifo_getinfo();
#endif /* _KERNEL */
#ifdef __cplusplus
}
#endif
#endif /* _SYS_FS_FIFONODE_H */