Add kern/lwkt_rwlock.c -- reader/writer locks. Clean up the process exit &
[dragonfly.git] / sys / sys / disk.h
1 /*
2  * ----------------------------------------------------------------------------
3  * "THE BEER-WARE LICENSE" (Revision 42):
4  * <phk@FreeBSD.ORG> wrote this file.  As long as you retain this notice you
5  * can do whatever you want with this stuff. If we meet some day, and you think
6  * this stuff is worth it, you can buy me a beer in return.   Poul-Henning Kamp
7  * ----------------------------------------------------------------------------
8  *
9  * $FreeBSD: src/sys/sys/disk.h,v 1.16.2.3 2001/06/20 16:11:01 scottl Exp $
10  * $DragonFly: src/sys/sys/disk.h,v 1.2 2003/06/17 04:28:58 dillon Exp $
11  *
12  */
13
14 #ifndef _SYS_DISK_H_
15 #define _SYS_DISK_H_
16
17 #ifndef _SYS_DISKSLICE_H_
18 #include <sys/diskslice.h>
19 #endif /* _SYS_DISKSLICE_H_ */
20
21 #ifndef _SYS_DISKLABEL
22 #include <sys/disklabel.h>
23 #endif /* _SYS_DISKLABEL */
24
25 struct disk {
26         u_int                   d_flags;
27         u_int                   d_dsflags;
28         struct cdevsw           *d_devsw;
29         dev_t                   d_dev;
30         struct diskslices       *d_slice;
31         struct disklabel        d_label;
32         LIST_ENTRY(disk)        d_list;
33 };
34
35 #define DISKFLAG_LOCK           0x1
36 #define DISKFLAG_WANTED         0x2
37
38 dev_t disk_create __P((int unit, struct disk *disk, int flags, struct cdevsw *cdevsw, struct cdevsw *diskdevsw));
39 void disk_destroy __P((dev_t dev));
40 int disk_dumpcheck __P((dev_t dev, u_int *count, u_int *blkno, u_int *secsize));
41 struct disk *disk_enumerate __P((struct disk *disk));
42 void disk_invalidate __P((struct disk *disk));
43
44 #endif /* _SYS_DISK_H_ */