Linux needs %edx to be 0 on entry. It registers it as an atexit function if
[dragonfly.git] / sys / sys / disk.h
CommitLineData
984263bc
MD
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 $
335dda38 10 * $DragonFly: src/sys/sys/disk.h,v 1.3 2003/07/22 17:03:34 dillon Exp $
984263bc
MD
11 *
12 */
13
14#ifndef _SYS_DISK_H_
15#define _SYS_DISK_H_
16
17#ifndef _SYS_DISKSLICE_H_
18#include <sys/diskslice.h>
335dda38 19#endif
984263bc
MD
20
21#ifndef _SYS_DISKLABEL
22#include <sys/disklabel.h>
335dda38
MD
23#endif
24
25#ifndef _SYS_DISKLABEL
26#include <sys/msgport.h>
27#endif
984263bc
MD
28
29struct disk {
335dda38
MD
30 struct lwkt_port d_port; /* interception port */
31 struct lwkt_port *d_fwdport; /* forward to real port */
984263bc
MD
32 u_int d_flags;
33 u_int d_dsflags;
984263bc
MD
34 dev_t d_dev;
35 struct diskslices *d_slice;
36 struct disklabel d_label;
37 LIST_ENTRY(disk) d_list;
38};
39
40#define DISKFLAG_LOCK 0x1
41#define DISKFLAG_WANTED 0x2
42
335dda38
MD
43dev_t disk_create __P((int unit, struct disk *disk, int flags, struct cdevsw *cdevsw));
44void disk_destroy __P((struct disk *disk));
984263bc
MD
45int disk_dumpcheck __P((dev_t dev, u_int *count, u_int *blkno, u_int *secsize));
46struct disk *disk_enumerate __P((struct disk *disk));
47void disk_invalidate __P((struct disk *disk));
48
49#endif /* _SYS_DISK_H_ */