8442 uts: startup_bios_disk() should check for BIOS
[unleashed.git] / include / sys / winlockio.h
blob452a38824c310f75fba6e4a29745a934bfeacf46
1 /*
2 * CDDL HEADER START
4 * The contents of this file are subject to the terms of the
5 * Common Development and Distribution License, Version 1.0 only
6 * (the "License"). You may not use this file except in compliance
7 * with the License.
9 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10 * or http://www.opensolaris.org/os/licensing.
11 * See the License for the specific language governing permissions
12 * and limitations under the License.
14 * When distributing Covered Code, include this CDDL HEADER in each
15 * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
16 * If applicable, add the following below this CDDL HEADER, with the
17 * fields enclosed by brackets "[]" replaced with your own identifying
18 * information: Portions Copyright [yyyy] [name of copyright owner]
20 * CDDL HEADER END
23 * Copyright 2003 Sun Microsystems, Inc. All rights reserved.
24 * Use is subject to license terms.
27 #ifndef _SYS_WINLOCKIO_H
28 #define _SYS_WINLOCKIO_H
30 #pragma ident "%Z%%M% %I% %E% SMI"
32 #include <sys/types.h>
33 #include <sys/ioccom.h>
35 #ifdef __cplusplus
36 extern "C" {
37 #endif
40 * Structure for allocating lock contexts.
41 * The page number portion of sy_ident is the offset for mmap(2).
42 * The page offset portion of sy_ident is the byte-offset relative to
43 * the start of the page returned by mmap(2) and should added to it.
46 struct winlockalloc {
47 uint_t sy_key; /* user-provided key, if any */
48 uint_t sy_ident; /* system-provided identification */
52 * Structure for getting and setting lock timeouts or NOTIMEOUT flag
55 struct winlocktimeout {
56 uint_t sy_ident; /* system-provided identification */
57 uint_t sy_timeout; /* timeout value in seconds */
58 int sy_flags; /* Flags for lock context - see defs below */
61 #define WIOC ('L'<<8)
64 #define WINLOCKALLOC (WIOC|0)
65 #define WINLOCKFREE (WIOC|1)
66 #define WINLOCKSETTIMEOUT (WIOC|2)
67 #define WINLOCKGETTIMEOUT (WIOC|3)
68 #define WINLOCKDUMP (WIOC|4)
70 #ifndef GRABPAGEALLOC
71 #include <sys/fbio.h> /* defines GRAB* ioctls */
72 #endif
74 /* flag bits */
75 #define SY_NOTIMEOUT 0x1 /* This client never times out */
77 #ifdef _KERNEL
79 #define UFLAGS 0x00ff /* flags usable by users */
80 #define KFLAGS 0xff00 /* flags used by driver implementation */
81 #define TRASHPAGE 0x0400 /* process has unlock mapping to trashpage */
83 #endif /* _KERNEL */
85 #ifdef __cplusplus
87 #endif
89 #endif /* _SYS_WINLOCKIO_H */