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/ioctl.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 /*      minix/ioctl.h - Ioctl helper definitions.       Author: Kees J. Bot
    2  *                                                              23 Nov 2002
    3  *
    4  * This file is included by every header file that defines ioctl codes.
    5  */
    6 
    7 #ifndef _M_IOCTL_H
    8 #define _M_IOCTL_H
    9 
   10 #ifndef _TYPES_H
   11 #include <sys/types.h>
   12 #endif
   13 
   14 #if _EM_WSIZE >= 4
   15 /* Ioctls have the command encoded in the low-order word, and the size
   16  * of the parameter in the high-order word. The 3 high bits of the high-
   17  * order word are used to encode the in/out/void status of the parameter.
   18  */
   19 #define _IOCPARM_MASK   0x1FFF
   20 #define _IOC_VOID       0x20000000
   21 #define _IOCTYPE_MASK   0xFFFF
   22 #define _IOC_IN         0x40000000
   23 #define _IOC_OUT        0x80000000
   24 #define _IOC_INOUT      (_IOC_IN | _IOC_OUT)
   25 
   26 #define _IO(x,y)        ((x << 8) | y | _IOC_VOID)
   27 #define _IOR(x,y,t)     ((x << 8) | y | ((sizeof(t) & _IOCPARM_MASK) << 16) |\
   28                                 _IOC_OUT)
   29 #define _IOW(x,y,t)     ((x << 8) | y | ((sizeof(t) & _IOCPARM_MASK) << 16) |\
   30                                 _IOC_IN)
   31 #define _IORW(x,y,t)    ((x << 8) | y | ((sizeof(t) & _IOCPARM_MASK) << 16) |\
   32                                 _IOC_INOUT)
   33 #else
   34 /* No fancy encoding on a 16-bit machine. */
   35 
   36 #define _IO(x,y)        ((x << 8) | y)
   37 #define _IOR(x,y,t)     _IO(x,y)
   38 #define _IOW(x,y,t)     _IO(x,y)
   39 #define _IORW(x,y,t)    _IO(x,y)
   40 #endif
   41 
   42 int ioctl(int _fd, int _request, void *_data);
   43 
   44 #endif /* _M_IOCTL_H */

Cache object: 89c664b4c4897449cc7b47910e3ba3ee


[ 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.