VirtualBox

Changeset 21536 in vbox for trunk/include


Ignore:
Timestamp:
Jul 13, 2009 2:49:39 PM (15 years ago)
Author:
vboxsync
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/include/iprt/thread.h

    r20374 r21536  
    432432 * Check if preemption is currently enabled or not for the current thread.
    433433 *
     434 * @note    This may return true even on systems where preemption isn't
     435 *          possible. In that case, it means no call to RTThreadPreemptDisable
     436 *          has been made and interrupts are still enabled.
     437 *
    434438 * @returns true if preemtion is enabled, false if preemetion is disabled.
    435  * @param       hThread         Must be NIL_RTTHREAD for now.
     439 * @param   hThread             Must be NIL_RTTHREAD for now.
    436440 */
    437441RTDECL(bool) RTThreadPreemptIsEnabled(RTTHREAD hThread);
     
    451455 * Is RTThreadPreemptIsPending reliable?
    452456 *
    453  * @returns true if pending, false if not.
     457 * @returns true if reliable, false if not.
    454458 */
    455459RTDECL(bool) RTThreadPreemptIsPendingTrusty(void);
     460
     461/**
     462 * Is preemption possible on this system.
     463 *
     464 * @returns true if possible, false if not.
     465 */
     466RTDECL(bool) RTThreadPreemptIsPossible(void);
    456467
    457468/**
     
    495506RTDECL(void) RTThreadPreemptRestore(PRTTHREADPREEMPTSTATE pState);
    496507
     508/**
     509 * Check if the thread is executing in interrupt context.
     510 *
     511 * @returns true if in interrupt context, false if not.
     512 * @param       hThread         Must be NIL_RTTHREAD for now.
     513 */
     514RTDECL(bool) RTThreadIsInInterrupt(RTTHREAD hThread);
     515
    497516#endif /* IN_RING0 */
    498517
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