VirtualBox

Changeset 23065 in vbox for trunk/src/VBox/Runtime


Ignore:
Timestamp:
Sep 16, 2009 12:08:42 PM (15 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
52397
Message:

Runtime: fixed IPRT_TARGET_NT4.

Location:
trunk/src/VBox/Runtime/r0drv/nt
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Runtime/r0drv/nt/initterm-r0drv-nt.cpp

    r19990 r23065  
    7272     * Init the Nt cpu set.
    7373     */
     74#ifdef IPRT_TARGET_NT4
     75    KAFFINITY ActiveProcessors = (UINT64_C(1) << KeNumberProcessors) - UINT64_C(1);
     76#else
    7477    KAFFINITY ActiveProcessors = KeQueryActiveProcessors();
     78#endif
    7579    RTCpuSetEmpty(&g_rtMpNtCpuSet);
    7680    RTCpuSetFromU64(&g_rtMpNtCpuSet, ActiveProcessors);
    7781
     82#ifdef IPRT_TARGET_NT4
     83    g_pfnrtNtExSetTimerResolution = NULL;
     84    g_pfnrtNtKeFlushQueuedDpcs = NULL;
     85#else
    7886    /*
    7987     * Initialize the function pointers.
     
    8593    RtlInitUnicodeString(&RoutineName, L"KeFlushQueuedDpcs");
    8694    g_pfnrtNtKeFlushQueuedDpcs = (PFNMYKEFLUSHQUEUEDDPCS)MmGetSystemRoutineAddress(&RoutineName);
     95#endif
    8796
    8897    /*
  • trunk/src/VBox/Runtime/r0drv/nt/memobj-r0drv-nt.cpp

    r21497 r23065  
    671671            return VERR_NOT_SUPPORTED;
    672672
     673#ifdef IPRT_TARGET_NT4
     674        /* NT SP0 can't map to a specific address. */
     675        if (pvFixed != (void *)-1)
     676            return VERR_NOT_SUPPORTED;
     677#endif
     678
    673679        /* we can't map anything to the first page, sorry. */
    674680        if (pvFixed == 0)
     
    684690            /** @todo uAlignment */
    685691            /** @todo How to set the protection on the pages? */
     692#ifdef IPRT_TARGET_NT4
     693            void *pv = MmMapLockedPages(pMemNtToMap->apMdls[0],
     694                                        R0Process == NIL_RTR0PROCESS ? KernelMode : UserMode);
     695#else
    686696            void *pv = MmMapLockedPagesSpecifyCache(pMemNtToMap->apMdls[0],
    687697                                                    R0Process == NIL_RTR0PROCESS ? KernelMode : UserMode,
     
    690700                                                    FALSE /* no bug check on failure */,
    691701                                                    NormalPagePriority);
     702#endif
    692703            if (pv)
    693704            {
  • trunk/src/VBox/Runtime/r0drv/nt/mp-r0drv-nt.cpp

    r19911 r23065  
    229229#endif
    230230
     231#ifdef IPRT_TARGET_NT4
     232    KAFFINITY Mask;
     233    /* g_pfnrtNt* do not present on NT anyway. */
     234    return VERR_NOT_SUPPORTED;
     235#else
    231236    KAFFINITY Mask = KeQueryActiveProcessors();
     237#endif
    232238
    233239    /* KeFlushQueuedDpcs is not present in Windows 2000; import it dynamically so we can just fail this call. */
  • trunk/src/VBox/Runtime/r0drv/nt/time-r0drv-nt.cpp

    r9958 r23065  
    4040DECLINLINE(uint64_t) rtTimeGetSystemNanoTS(void)
    4141{
    42 #if 1
     42#ifndef IPRT_TARGET_NT4
    4343    ULONGLONG InterruptTime = KeQueryInterruptTime();
    4444    return (uint64_t)InterruptTime * 100; /* The value is in 100ns, convert to ns units. */
     
    8383{
    8484    LARGE_INTEGER SystemTime;
    85 #if 1
     85#ifndef IPRT_TARGET_NT4
    8686    KeQuerySystemTime(&SystemTime);
    8787#else
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