VirtualBox

Ignore:
Timestamp:
Jul 13, 2009 2:49:39 PM (16 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
50009
Message:

iprt/thread.h: Redefined RTThreadPreemptIsEnabled for systems without preemption (we keep count ourselves). Added RTThreadPreemptIsPossible and RTThreadIsInInterrupt. Fixed RTThreadPreemptIsEnabled on FreeBSD and Solaris/vbi.

File:
1 edited

Legend:

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

    r20124 r21536  
    2929 */
    3030
     31
    3132/*******************************************************************************
    3233*   Header Files                                                               *
     
    3536#include <iprt/thread.h>
    3637
     38#include <iprt/asm.h>
    3739#include <iprt/assert.h>
    3840#include <iprt/err.h>
    3941#include <iprt/mp.h>
    40 #include <iprt/asm.h>
    4142
    4243
     
    5253} RTDARWINPREEMPTHACK;
    5354typedef RTDARWINPREEMPTHACK *PRTDARWINPREEMPTHACK;
    54 
    5555
    5656
     
    130130
    131131
     132RTDECL(bool) RTThreadPreemptIsPossible(void)
     133{
     134    /* yes, kernel preemption is possible. */
     135    return true;
     136}
     137
     138
    132139RTDECL(void) RTThreadPreemptDisable(PRTTHREADPREEMPTSTATE pState)
    133140{
     
    181188
    182189
     190RTDECL(bool) RTThreadIsInInterrupt(RTTHREAD hThread)
     191{
     192    Assert(hThread == NIL_RTTHREAD); NOREF(hThread);
     193    /** @todo Solaris: Implement RTThreadIsInInterrupt. Required for guest
     194     *        additions! */
     195    return !ASMIntAreEnabled();
     196}
     197
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