The Design and Implementation of the FreeBSD Operating System, Second Edition
Now available: The Design and Implementation of the FreeBSD Operating System (Second Edition)


[ source navigation ] [ diff markup ] [ identifier search ] [ freetext search ] [ file search ] [ list types ] [ track identifier ]

FreeBSD/Linux Kernel Cross Reference
sys/include/minix/dmap.h

Version: -  FREEBSD  -  FREEBSD-13-STABLE  -  FREEBSD-13-0  -  FREEBSD-12-STABLE  -  FREEBSD-12-0  -  FREEBSD-11-STABLE  -  FREEBSD-11-0  -  FREEBSD-10-STABLE  -  FREEBSD-10-0  -  FREEBSD-9-STABLE  -  FREEBSD-9-0  -  FREEBSD-8-STABLE  -  FREEBSD-8-0  -  FREEBSD-7-STABLE  -  FREEBSD-7-0  -  FREEBSD-6-STABLE  -  FREEBSD-6-0  -  FREEBSD-5-STABLE  -  FREEBSD-5-0  -  FREEBSD-4-STABLE  -  FREEBSD-3-STABLE  -  FREEBSD22  -  l41  -  OPENBSD  -  linux-2.6  -  MK84  -  PLAN9  -  xnu-8792 
SearchContext: -  none  -  3  -  10 

    1 #ifndef _DMAP_H
    2 #define _DMAP_H
    3 
    4 #include <minix/sys_config.h>
    5 #include <minix/ipc.h>
    6 
    7 /*===========================================================================*
    8  *                       Device <-> Driver Table                             *
    9  *===========================================================================*/
   10 
   11 /* Device table.  This table is indexed by major device number.  It provides
   12  * the link between major device numbers and the routines that process them.
   13  * The table can be update dynamically. The field 'dmap_flags' describe an 
   14  * entry's current status and determines what control options are possible. 
   15  */
   16 #define DMAP_MUTABLE            0x01    /* mapping can be overtaken */
   17 #define DMAP_BUSY               0x02    /* driver busy with request */
   18 #define DMAP_BABY               0x04    /* driver exec() not done yet */
   19 
   20 enum dev_style { STYLE_DEV, STYLE_NDEV, STYLE_TTY, STYLE_CLONE };
   21 
   22 extern struct dmap {
   23   int _PROTOTYPE ((*dmap_opcl), (int, Dev_t, int, int) );
   24   void _PROTOTYPE ((*dmap_io), (int, message *) );
   25   int dmap_driver;
   26   int dmap_flags;
   27 } dmap[];
   28 
   29 /*===========================================================================*
   30  *                       Major and minor device numbers                      *
   31  *===========================================================================*/
   32 
   33 /* Total number of different devices. */
   34 #define NR_DEVICES                32                    /* number of (major) devices */
   35 
   36 /* Major and minor device numbers for MEMORY driver. */
   37 #define MEMORY_MAJOR               1    /* major device for memory devices */
   38 #  define RAM_DEV                  0    /* minor device for /dev/ram */
   39 #  define MEM_DEV                  1    /* minor device for /dev/mem */
   40 #  define KMEM_DEV                 2    /* minor device for /dev/kmem */
   41 #  define NULL_DEV                 3    /* minor device for /dev/null */
   42 #  define BOOT_DEV                 4    /* minor device for /dev/boot */
   43 #  define ZERO_DEV                 5    /* minor device for /dev/zero */
   44 
   45 #define CTRLR(n) ((n)==0 ? 3 : (8 + 2*((n)-1))) /* magic formula */
   46 
   47 /* Full device numbers that are special to the boot monitor and FS. */
   48 #  define DEV_RAM             0x0100    /* device number of /dev/ram */
   49 #  define DEV_BOOT            0x0104    /* device number of /dev/boot */
   50 
   51 #define FLOPPY_MAJOR               2    /* major device for floppy disks */
   52 #define TTY_MAJOR                  4    /* major device for ttys */
   53 #define CTTY_MAJOR                 5    /* major device for /dev/tty */
   54 
   55 #define INET_MAJOR                 7    /* major device for inet */
   56 
   57 #define RESCUE_MAJOR               9    /* major device for rescue */
   58 
   59 #define LOG_MAJOR                 15    /* major device for log driver */
   60 #  define IS_KLOG_DEV              0    /* minor device for /dev/klog */
   61 
   62 #endif /* _DMAP_H */

Cache object: a4ae9ed42932ee5e49989349cacf3607


[ source navigation ] [ diff markup ] [ identifier search ] [ freetext search ] [ file search ] [ list types ] [ track identifier ]


This page is part of the FreeBSD/Linux Linux Kernel Cross-Reference, and was automatically generated using a modified version of the LXR engine.