VirtualBox

Changeset 37040 in vbox


Ignore:
Timestamp:
May 11, 2011 4:42:48 PM (14 years ago)
Author:
vboxsync
Message:

RTThreadPreemptIsPending/darwin: Try to unbreak this on AMD64.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Runtime/r0drv/darwin/threadpreempt-r0drv-darwin.cpp

    r29255 r37040  
    108108    /* HACK ALERT! This ASSUMES that the cpu_pending_ast member of cpu_data_t doesn't move. */
    109109    uint32_t ast_pending;
    110 #if 1
     110#if defined(RT_ARCH_X86) || defined(RT_ARCH_AMD64)
    111111    __asm__ volatile("movl %%gs:%P1,%0\n\t"
    112112                     : "=r" (ast_pending)
    113                      : "i"  (7*sizeof(void*) + 7*sizeof(int)));
     113                     : "i"  (7*sizeof(void*) + (7 + (ARCH_BITS == 64)) *sizeof(int)) );
    114114#else
     115# error fixme.
    115116    cpu_data_t *pCpu = current_cpu_datap(void);
    116117    AssertCompileMemberOffset(cpu_data_t, cpu_pending_ast, 7*sizeof(void*) + 7*sizeof(int));
     
    124125RTDECL(bool) RTThreadPreemptIsPendingTrusty(void)
    125126{
    126     /* yes, we think thaat RTThreadPreemptIsPending is reliable... */
     127    /* yes, we think that RTThreadPreemptIsPending is reliable... */
    127128    return true;
    128129}
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