VirtualBox

Changeset 55436 in vbox for trunk/include


Ignore:
Timestamp:
Apr 27, 2015 9:13:02 AM (10 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
99782
Message:

Reverted bad commit r99781.

Location:
trunk/include
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/VBox/sup.h

    r55435 r55436  
    3333#include <iprt/stdarg.h>
    3434#include <iprt/cpuset.h>
    35 #include <iprt/power.h>
    3635#if defined(RT_ARCH_AMD64) || defined(RT_ARCH_X86)
    3736# include <iprt/asm-amd64-x86.h>
     
    10711070 * Initializes the support library.
    10721071 *
    1073  * Each successful call to SUPR3Init() or SUPR3InitEx() must be countered by a
     1072 * Each successful call to SUPR3Init() or SUPR3InitEx must be countered by a
    10741073 * call to SUPR3Term(false).
    10751074 *
     
    10831082 * Initializes the support library, extended version.
    10841083 *
    1085  * Each successful call to SUPR3Init() or SUPR3InitEx() must be countered by a
     1084 * Each successful call to SUPR3Init() or SUPR3InitEx must be countered by a
    10861085 * call to SUPR3Term(false).
    10871086 *
     
    17451744 */
    17461745SUPR3DECL(int) SUPR3ReadTsc(uint64_t *puTsc, uint16_t *pidApic);
    1747 
    1748 
    1749 /**
    1750  * Waits for a host power event.
    1751  *
    1752  * This times out every few seconds, so caller is expected to retry if needed.
    1753  *
    1754  * @returns VBox status code.
    1755  * @param   pEvent          Where to store the power event that occurs.
    1756  */
    1757 SUPR3DECL(int) SUPR3WaitForPowerEvent(RTPOWEREVENT *pEvent);
    1758 
    1759 
    1760 /**
    1761  * Acknowledges a host power event.
    1762  *
    1763  * @returns VBox status code.
    1764  */
    1765 SUPR3DECL(int) SUPR3AckPowerEvent(void);
    17661746
    17671747/** @} */
  • trunk/include/iprt/power.h

    r55435 r55436  
    3838 */
    3939
     40#ifdef IN_RING0
     41
    4042/**
    4143 * MP event, see FNRTPOWERNOTIFICATION.
     
    4345typedef enum RTPOWEREVENT
    4446{
    45     /** Invalid power event. */
    46     RTPOWEREVENT_INVALID = 1,
    47     /** The system is preparing for a suspend operation.
    48      *  If supported, this should arrive earlier than RTPOWEREVENT_SUSPEND. */
    49     RTPOWEREVENT_PRE_SUSPEND,
    5047    /** The system will go into suspend mode. */
    51     RTPOWEREVENT_SUSPEND,
     48    RTPOWEREVENT_SUSPEND = 1,
    5249    /** The system has resumed. */
    5350    RTPOWEREVENT_RESUME
    5451} RTPOWEREVENT;
    55 /** Pointer to a power event. */
    56 typedef RTPOWEREVENT *PRTPOWEREVENT;
    57 
    58 /**
    59  * Gets the descriptive power event name.
    60  *
    61  * @returns The name.
    62  * @param   enmEvent      The power event.
    63  */
    64 DECLINLINE(const char *) RTPowerGetEventName(RTPOWEREVENT enmEvent)
    65 {
    66     switch (enmEvent)
    67     {
    68         case RTPOWEREVENT_INVALID:          return "Invalid";
    69         case RTPOWEREVENT_PRE_SUSPEND:      return "Pre-suspend";
    70         case RTPOWEREVENT_SUSPEND:          return "Suspend";
    71         case RTPOWEREVENT_RESUME:           return "Resume";
    72         default:                            return "???";
    73     }
    74 }
    75 
    76 
    77 #ifdef IN_RING0
    7852
    7953/**
     
    8256 * The context this is called in differs a bit from platform to
    8357 * platform, so be careful while in here.
    84  *
    85  * On Linux, the pre-suspend, suspend and resume events fire with preemption
    86  * enabled on any CPU.
    8758 *
    8859 * @param   enmEvent    The event.
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