VirtualBox

Changeset 54238 in vbox


Ignore:
Timestamp:
Feb 17, 2015 3:26:13 PM (10 years ago)
Author:
vboxsync
Message:

Runtime/r0drv/solaris: timer todo and nit.

File:
1 edited

Legend:

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

    r54236 r54238  
    55
    66/*
    7  * Copyright (C) 2006-2014 Oracle Corporation
     7 * Copyright (C) 2006-2015 Oracle Corporation
    88 *
    99 * This file is part of VirtualBox Open Source Edition (OSE), as
     
    9393        struct
    9494        {
    95             /** Cyclic handler. */
    96             cyc_handler_t   Handler;
    97             /** Cyclic time and interval representation. */
    98             cyc_time_t      FireTime;
    9995            /** Timer ticks. */
    10096            uint64_t        u64Tick;
     
    514510    else
    515511    {
     512        cyc_handler_t Handler;
     513        cyc_time_t    FireTime;
     514
    516515        /*
    517516         * Setup a single CPU timer.   If a specific CPU was requested, it
     
    527526        }
    528527
    529         /** @todo we probably don't need to have cyc_handler_t and cyc_time_t in the
    530          *        timer structure... */
    531         pTimer->u.Single.Handler.cyh_func  = (cyc_func_t)rtTimerSolSingleCallbackWrapper;
    532         pTimer->u.Single.Handler.cyh_arg   = pTimer;
    533         pTimer->u.Single.Handler.cyh_level = CY_LOCK_LEVEL;
     528        Handler.cyh_func  = (cyc_func_t)rtTimerSolSingleCallbackWrapper;
     529        Handler.cyh_arg   = pTimer;
     530        Handler.cyh_level = CY_LOCK_LEVEL;
    534531
    535532        /*
     
    538535         * See @bugref{7691} comment #20.
    539536         */
    540         pTimer->u.Single.FireTime.cyt_when = RTTimeSystemNanoTS() + u64First;
    541         if (pTimer->fSpecificCpu)
    542             pTimer->u.Single.FireTime.cyt_when += RT_NS_1HOUR;
    543         pTimer->u.Single.FireTime.cyt_interval = pTimer->cNsInterval != 0
    544                                                ? pTimer->cNsInterval
    545                                                : CY_INFINITY /* Special value, see cyclic_fire(). */;
     537        if (!pTimer->fSpecificCpu)
     538            FireTime.cyt_when = RTTimeSystemNanoTS() + u64First;
     539        else
     540            FireTime.cyt_when = RTTimeSystemNanoTS() + u64First + RT_NS_1HOUR;
     541        FireTime.cyt_interval = pTimer->cNsInterval != 0
     542                              ? pTimer->cNsInterval
     543                              : CY_INFINITY /* Special value, see cyclic_fire(). */;
    546544        pTimer->u.Single.u64Tick = 0;
    547545        pTimer->u.Single.nsNextTick = 0;
    548546
    549         pTimer->hCyclicId = cyclic_add(&pTimer->u.Single.Handler, &pTimer->u.Single.FireTime);
     547        pTimer->hCyclicId = cyclic_add(&Handler, &FireTime);
    550548        if (pTimer->fSpecificCpu)
    551549        {
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