VirtualBox

Changeset 5819 in vbox


Ignore:
Timestamp:
Nov 22, 2007 6:08:26 PM (17 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
26248
Message:

Additions: added an R3 runtime for Linux guests

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/VBox/VBoxGuest.h

    r5605 r5819  
    10641064/** VRDP status changed. */
    10651065#define VMMDEV_EVENT_VRDP                                   RT_BIT(8)
    1066 
    10671066
    10681067/** @} */
     
    11141113 *          needs to be created so the most efficient IOCtl data buffering method can be
    11151114 *          used.
     1115 *
     1116 * @remark  On Linux (at least), things are not as grim as portrayed above.  The IOCtl
     1117 *          numbering system is pure convention designed in order to simplify error checking.
     1118 *          The numbers only have meaning to the driver which implements the IOCtl, and are
     1119 *          completely ignored by the system.  In fact, the oldest IOCtls still in use today
     1120 *          predate the current numbering system, and several of the ones implemented since
     1121 *          then implement it wrongly.  See 'man ioctl_list' for more information.
     1122 *            -Michael
    11161123 *
    11171124 * @{
     
    11361143
    11371144#elif defined(RT_OS_LINUX)
    1138 # define IOCTL_CODE(DeviceType, Function, Method_ignored, Access_ignored, DataSize) \
    1139     ( (3 << 30) | ((DeviceType) << 8) | (Function) | ((DataSize) << 16) )
    1140 # define METHOD_BUFFERED        0
    1141 # define FILE_WRITE_ACCESS      0x0002
    1142 # define FILE_DEVICE_UNKNOWN    0x00000022
     1145/* Note that we can't use the Linux header IOCtl macros directly, as they expect a "type"
     1146   argument, whereas we provide "sizeof(type)". */
     1147/* VBOXGUEST_IOCTL_CODE(Function, sizeof(type)) == _IOWR('V', (Function) | VBOXGUEST_IOCTL_FLAG, (type)) */
     1148# define VBOXGUEST_IOCTL_CODE(Function, Size)   ( (3 << 30) | ('V' << 8) | (Function) | VBOXGUEST_IOCTL_FLAG | (Size << 16) )
     1149/* VBOXGUEST_IOCTL_CODE_FAST(Function) == _IO(  'V', (Function) | VBOXGUEST_IOCTL_FLAG) */
     1150# define VBOXGUEST_IOCTL_CODE_FAST(Function)    ( 'V' << 8 | (Function) | VBOXGUEST_IOCTL_FLAG)
    11431151
    11441152#elif 0 /* BSD style - needs some adjusting _IORW takes a type and not a size. */
     
    11701178# define VBOXGUEST_IOCTL_WAITEVENT      VBOXGUEST_IOCTL_CODE(2, sizeof(VBoxGuestWaitEventInfo))
    11711179# define IOCTL_VBOXGUEST_WAITEVENT      VBOXGUEST_IOCTL_WAITEVENT
     1180# define VBOXGUEST_IOCTL_WAITEVENT_INTERRUPT_ALL \
     1181                                        VBOXGUEST_IOCTL_CODE(5, 0)
     1182# define IOCTL_VBOXGUEST_WAITEVENT_INTERRUPT_ALL \
     1183                                        VBOXGUEST_IOCTL_WAITEVENT_INTERRUPT_ALL
    11721184#else
    11731185# define IOCTL_VBOXGUEST_WAITEVENT IOCTL_CODE(FILE_DEVICE_UNKNOWN, 2049, METHOD_BUFFERED, FILE_WRITE_ACCESS, sizeof(VBoxGuestWaitEventInfo))
     1186# define IOCTL_VBOXGUEST_WAITEVENT_INTERRUPT_ALL \
     1187                                        IOCTL_CODE(FILE_DEVICE_UNKNOWN, 2051, METHOD_BUFFERED, \
     1188                                        FILE_WRITE_ACCESS, 0)
    11741189#endif
    11751190
     
    15061521VBGLR3DECL(int)     VbglR3Init(void);
    15071522VBGLR3DECL(void)    VbglR3Term(void);
     1523VBGLR3DECL(int)     VbglR3GRAlloc(VMMDevRequestHeader **ppReq, uint32_t cbSize,
     1524                                  VMMDevRequestType reqType);
    15081525VBGLR3DECL(int)     VbglR3GRPerform(VMMDevRequestHeader *pReq);
     1526VBGLR3DECL(void)    VbglR3GRFree(VMMDevRequestHeader *pReq);
    15091527# ifdef __iprt_time_h__
    15101528VBGLR3DECL(int)     VbglR3GetHostTime(PRTTIMESPEC pTime);
Note: See TracChangeset for help on using the changeset viewer.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette