~ubuntu-branches/ubuntu/raring/virtualbox-ose/raring

« back to all changes in this revision

Viewing changes to src/VBox/Runtime/r0drv/solaris/vbi/timer-r0drv-solaris.c

  • Committer: Bazaar Package Importer
  • Author(s): Felix Geyer
  • Date: 2011-01-30 23:27:25 UTC
  • mfrom: (0.3.12 upstream)
  • Revision ID: james.westby@ubuntu.com-20110130232725-2ouajjd2ggdet0zd
Tags: 4.0.2-dfsg-1ubuntu1
* Merge from Debian unstable, remaining changes:
  - Add Apport hook.
    - debian/virtualbox-ose.files/source_virtualbox-ose.py
    - debian/virtualbox-ose.install
  - Drop *-source packages.
* Drop ubuntu-01-fix-build-gcc45.patch, fixed upstream.
* Drop ubuntu-02-as-needed.patch, added to the Debian package.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/* $Id: timer-r0drv-solaris.c $ */
 
1
/* $Id: timer-r0drv-solaris.c 32572 2010-09-16 16:18:12Z vboxsync $ */
2
2
/** @file
3
3
 * IPRT - Timer, Ring-0 Driver, Solaris.
4
4
 */
102
102
 
103
103
 
104
104
 
105
 
RTDECL(int) RTTimerCreateEx(PRTTIMER *ppTimer, uint64_t u64NanoInterval, unsigned fFlags, PFNRTTIMER pfnTimer, void *pvUser)
 
105
RTDECL(int) RTTimerCreateEx(PRTTIMER *ppTimer, uint64_t u64NanoInterval, uint32_t fFlags, PFNRTTIMER pfnTimer, void *pvUser)
106
106
{
107
107
    RT_ASSERT_PREEMPTIBLE();
108
108
    *ppTimer = NULL;
117
117
 
118
118
    if (    (fFlags & RTTIMER_FLAGS_CPU_SPECIFIC)
119
119
        &&  (fFlags & RTTIMER_FLAGS_CPU_ALL) != RTTIMER_FLAGS_CPU_ALL
120
 
        &&  !RTMpIsCpuPossible((fFlags & RTTIMER_FLAGS_CPU_MASK)))
 
120
        &&  !RTMpIsCpuPossible(RTMpCpuIdFromSetIndex(fFlags & RTTIMER_FLAGS_CPU_MASK)))
121
121
        return VERR_CPU_NOT_FOUND;
122
122
 
123
123
    if ((fFlags & RTTIMER_FLAGS_CPU_ALL) == RTTIMER_FLAGS_CPU_ALL && u64NanoInterval == 0)
142
142
    {
143
143
        pTimer->fAllCpu = false;
144
144
        pTimer->fSpecificCpu = true;
145
 
        pTimer->iCpu = fFlags & RTTIMER_FLAGS_CPU_MASK;
 
145
        pTimer->iCpu = fFlags & RTTIMER_FLAGS_CPU_MASK; /* ASSUMES: index == cpuid */
146
146
    }
147
147
    else
148
148
    {
236
236
 
237
237
 
238
238
 
 
239
RTDECL(int) RTTimerChangeInterval(PRTTIMER pTimer, uint64_t u64NanoInterval)
 
240
{
 
241
    RTTIMER_ASSERT_VALID_RET(pTimer);
 
242
 
 
243
    /** @todo implement me! */
 
244
 
 
245
    return VERR_NOT_SUPPORTED;
 
246
}
 
247
 
 
248
 
239
249
RTDECL(uint32_t) RTTimerGetSystemGranularity(void)
240
250
{
241
251
    return vbi_timer_granularity();
253
263
    return VERR_NOT_SUPPORTED;
254
264
}
255
265
 
 
266
 
 
267
RTDECL(bool) RTTimerCanDoHighResolution(void)
 
268
{
 
269
    /** @todo return true; - when missing bits have been implemented and tested*/
 
270
    return false;
 
271
}
 
272