VirtualBox

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


Ignore:
Timestamp:
May 23, 2009 2:18:51 PM (16 years ago)
Author:
vboxsync
Message:

iprt/linux: Fixed RTThreadPreemptIsEnabled, only tested without CONFIG_PREEMPT.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Runtime/r0drv/linux/thread-r0drv-linux.c

    r19937 r19941  
    7272{
    7373    Assert(hThread == NIL_RTTHREAD);
    74     return !in_atomic() && !irqs_disabled();
     74#ifdef CONFIG_PREEMPT
     75# ifdef preemptible
     76    return preemptible();
     77# else
     78    return preempt_count() == 0 && !in_atomic() && !irqs_disabled();
     79# endif
     80#else
     81    return false;
     82#endif
    7583}
    7684
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