VirtualBox

Changeset 20124 in vbox


Ignore:
Timestamp:
May 28, 2009 3:40:06 PM (15 years ago)
Author:
vboxsync
Message:

IPRT,SUP: Minor driver version change - added RTThreadPreemptIsPendingTrusty (for Windows and Darwin were we're doing really ugly stuff).

Location:
trunk
Files:
12 edited
1 copied

Legend:

Unmodified
Added
Removed
  • trunk/include/iprt/thread.h

    r20008 r20124  
    449449
    450450/**
     451 * Is RTThreadPreemptIsPending reliable?
     452 *
     453 * @returns true if pending, false if not.
     454 */
     455RTDECL(bool) RTThreadPreemptIsPendingTrusty(void);
     456
     457/**
    451458 * Preemption state saved by RTThreadPreemptDisable and used by
    452459 * RTThreadPreemptRestore to restore the previous state.
  • trunk/src/VBox/HostDrivers/Support/SUPDrv.c

    r19932 r20124  
    261261#endif
    262262/* RTThreadPreemptIsEnabled - not necessary */
    263 /* RTThreadPreemptIsPending  - not necessary */
     263/* RTThreadPreemptIsPending - not necessary */
     264/* RTThreadPreemptIsPendingTrusty - not necessary */
    264265/* RTThreadPreemptDisable - not necessary */
    265266DECLASM(void)   UNWIND_WRAP(RTThreadPreemptRestore)(RTTHREADPREEMPTSTATE pState);
     
    421422    { "RTThreadPreemptIsEnabled",               (void *)RTThreadPreemptIsEnabled },
    422423    { "RTThreadPreemptIsPending",               (void *)RTThreadPreemptIsPending },
     424    { "RTThreadPreemptIsPendingTrusty",         (void *)RTThreadPreemptIsPendingTrusty },
    423425    { "RTThreadPreemptDisable",                 (void *)RTThreadPreemptDisable },
    424426    { "RTThreadPreemptRestore",                 (void *)UNWIND_WRAP(RTThreadPreemptRestore) },
  • trunk/src/VBox/HostDrivers/Support/SUPDrvIOC.h

    r19932 r20124  
    188188 *            and renaming the related IOCtls too.
    189189 */
    190 #define SUPDRV_IOC_VERSION                              0x000c0003
     190#define SUPDRV_IOC_VERSION                              0x000c0004
    191191
    192192/** SUP_IOCTL_COOKIE. */
  • trunk/src/VBox/HostDrivers/Support/SUPLib.cpp

    r19892 r20124  
    260260        strcpy(CookieReq.u.In.szMagic, SUPCOOKIE_MAGIC);
    261261        CookieReq.u.In.u32ReqVersion = SUPDRV_IOC_VERSION;
    262         const uint32_t MinVersion = (SUPDRV_IOC_VERSION & 0xffff0000) == 0x000b0001
    263                                   ? 0x000b0001
     262        const uint32_t MinVersion = (SUPDRV_IOC_VERSION & 0xffff0000) >= 0x000c0004
     263                                  ? 0x000c0004
    264264                                  :  SUPDRV_IOC_VERSION & 0xffff0000;
    265265        CookieReq.u.In.u32MinVersion = MinVersion;
  • trunk/src/VBox/HostDrivers/Support/win/SUPDrvA-win.asm

    r19932 r20124  
    155155;NtWrapDyn2DrvFunctionWithAllRegParams  supdrvNtWrap, RTThreadPreemptIsEnabled - not necessary
    156156;NtWrapDyn2DrvFunctionWithAllRegParams  supdrvNtWrap, RTThreadPreemptIsPending - not necessary
     157;NtWrapDyn2DrvFunctionWithAllRegParams  supdrvNtWrap, RTThreadPreemptIsPendingTrusty - not necessary
    157158;NtWrapDyn2DrvFunctionWithAllRegParams  supdrvNtWrap, RTThreadPreemptDisable - not necessary
    158159NtWrapDyn2DrvFunctionWithAllRegParams  supdrvNtWrap, RTThreadPreemptRestore
  • trunk/src/VBox/Runtime/Makefile.kmk

    r20111 r20124  
    12841284        r0drv/generic/RTThreadPreemptIsEnabled-r0drv-generic.cpp \
    12851285        r0drv/generic/RTThreadPreemptIsPending-r0drv-generic.cpp \
     1286        r0drv/generic/RTThreadPreemptIsPendingTrusty-r0drv-generic.cpp \
    12861287        r0drv/generic/RTThreadPreemptDisable-r0drv-generic.cpp \
    12871288        r0drv/generic/RTThreadPreemptRestore-r0drv-generic.cpp \
  • trunk/src/VBox/Runtime/r0drv/darwin/threadpreempt-r0drv-darwin.cpp

    r19919 r20124  
    123123
    124124
     125RTDECL(bool) RTThreadPreemptIsPendingTrusty(void)
     126{
     127    /* yes, we think thaat RTThreadPreemptIsPending is reliable... */
     128    return true;
     129}
     130
     131
    125132RTDECL(void) RTThreadPreemptDisable(PRTTHREADPREEMPTSTATE pState)
    126133{
  • trunk/src/VBox/Runtime/r0drv/generic/RTThreadPreemptIsPendingTrusty-r0drv-generic.cpp

    r20113 r20124  
    11/* $Id$ */
    22/** @file
    3  * IPRT - RTThreadPreemptIsPending, Generic ring-0 driver implementation.
     3 * IPRT - RTThreadPreemptIsPendingTrusty, Generic ring-0 driver implementation.
    44 */
    55
    66/*
    7  * Copyright (C) 2008 Sun Microsystems, Inc.
     7 * Copyright (C) 2009 Sun Microsystems, Inc.
    88 *
    99 * This file is part of VirtualBox Open Source Edition (OSE), as
     
    3333*******************************************************************************/
    3434#include <iprt/thread.h>
    35 #include <iprt/assert.h>
    3635
    3736
    38 RTDECL(bool) RTThreadPreemptIsPending(RTTHREAD hThread)
     37RTDECL(bool) RTThreadPreemptIsPendingTrusty(void)
    3938{
    40     Assert(hThread == NIL_RTTHREAD);
     39    /* no, RTThreadPreemptIsPending is not reliable. */
    4140    return false;
    4241}
  • trunk/src/VBox/Runtime/r0drv/linux/thread-r0drv-linux.c

    r19941 r20124  
    102102
    103103
     104RTDECL(bool) RTThreadPreemptIsPendingTrusty(void)
     105{
     106    /* yes, RTThreadPreemptIsPending is reliable. */
     107    return true;
     108}
     109
     110
    104111RTDECL(void) RTThreadPreemptDisable(PRTTHREADPREEMPTSTATE pState)
    105112{
  • trunk/src/VBox/Runtime/r0drv/nt/thread-r0drv-nt.cpp

    r19969 r20124  
    148148
    149149
     150RTDECL(bool) RTThreadPreemptIsPendingTrusty(void)
     151{
     152    /* RTThreadPreemptIsPending is only reliable of we've got both offsets and size. */
     153    return offQuantumEnd    != 0
     154        && cbQuantumEnd     != 0
     155        && offDpcQueueDepth != 0;
     156}
     157
     158
    150159RTDECL(void) RTThreadPreemptDisable(PRTTHREADPREEMPTSTATE pState)
    151160{
  • trunk/src/VBox/Runtime/r0drv/os2/thread-r0drv-os2.cpp

    r19920 r20124  
    8282
    8383
     84RTDECL(bool) RTThreadPreemptIsPendingTrusty(void)
     85{
     86    /* yes, RTThreadPreemptIsPending is reliable. */
     87    return true;
     88}
     89
     90
    8491RTDECL(bool) RTThreadPreemptIsPending(RTTHREAD hThread)
    8592{
  • trunk/src/VBox/Runtime/r0drv/solaris/thread-r0drv-solaris.c

    r19917 r20124  
    122122
    123123
     124RTDECL(bool) RTThreadPreemptIsPendingTrusty(void)
     125{
     126    /* yes, RTThreadPreemptIsPending is reliable. */
     127    return true;
     128}
     129
     130
    124131RTDECL(void) RTThreadPreemptDisable(PRTTHREADPREEMPTSTATE pState)
    125132{
  • trunk/src/VBox/Runtime/r0drv/solaris/vbi/thread-r0drv-solaris.c

    r19917 r20124  
    113113
    114114
     115RTDECL(bool) RTThreadPreemptIsPendingTrusty(void)
     116{
     117    /* yes, RTThreadPreemptIsPending is reliable. */
     118    return true;
     119}
     120
     121
    115122RTDECL(void) RTThreadPreemptDisable(PRTTHREADPREEMPTSTATE pState)
    116123{
Note: See TracChangeset for help on using the changeset viewer.

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