VirtualBox

Ignore:
Timestamp:
Oct 15, 2008 6:34:30 PM (16 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
37971
Message:

iprt/r0drv/solaris/RTTimerCreateEx: initialize fAllCpu(s) and fSpecificCpu correctly for the normal timer case.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Runtime/r0drv/solaris/vbi/timer-r0drv-solaris.c

    r10954 r13298  
    3737#include <iprt/timer.h>
    3838#include <iprt/time.h>
     39#include <iprt/mp.h>
    3940#include <iprt/spinlock.h>
    4041#include <iprt/err.h>
     
    123124        pTimer->fAllCpu = true;
    124125        pTimer->fSpecificCpu = false;
     126        pTimer->iCpu = 255;
    125127    }
    126128    else if (fFlags & RTTIMER_FLAGS_CPU_SPECIFIC)
     
    129131        pTimer->fSpecificCpu = true;
    130132        pTimer->iCpu = fFlags & RTTIMER_FLAGS_CPU_MASK;
     133    }
     134    else
     135    {
     136        pTimer->fAllCpu = false;
     137        pTimer->fSpecificCpu = false;
     138        pTimer->iCpu = 255;
    131139    }
    132140    pTimer->interval = u64NanoInterval;
     
    184192    if (pTimer->fAllCpu)
    185193    {
    186         pTimer->gtimer = vbi_gtimer_begin(rtTimerSolarisCallbackWrapper, pTimer, u64First, pTimer->interval);
    187         if (pTimer->gtimer == NULL)
    188             return VERR_INVALID_PARAMETER;
     194        pTimer->gtimer = vbi_gtimer_begin(rtTimerSolarisCallbackWrapper, pTimer, u64First, pTimer->interval);
     195        if (pTimer->gtimer == NULL)
     196            return VERR_INVALID_PARAMETER;
    189197    }
    190198    else
     
    192200        if (pTimer->fSpecificCpu)
    193201            cpu = pTimer->iCpu;
    194         pTimer->stimer = vbi_stimer_begin(rtTimerSolarisCallbackWrapper, pTimer, u64First, pTimer->interval, cpu);
    195         if (pTimer->stimer == NULL)
     202        pTimer->stimer = vbi_stimer_begin(rtTimerSolarisCallbackWrapper, pTimer, u64First, pTimer->interval, cpu);
     203        if (pTimer->stimer == NULL)
    196204        {
    197205            if (cpu != VBI_ANY_CPU)
    198                 return VERR_CPU_OFFLINE;
    199             return VERR_INVALID_PARAMETER;
     206                return VERR_CPU_OFFLINE;
     207            return VERR_INVALID_PARAMETER;
    200208        }
    201209    }
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