Changeset 55436 in vbox for trunk/include
- Timestamp:
- Apr 27, 2015 9:13:02 AM (10 years ago)
- svn:sync-xref-src-repo-rev:
- 99782
- Location:
- trunk/include
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/VBox/sup.h
r55435 r55436 33 33 #include <iprt/stdarg.h> 34 34 #include <iprt/cpuset.h> 35 #include <iprt/power.h>36 35 #if defined(RT_ARCH_AMD64) || defined(RT_ARCH_X86) 37 36 # include <iprt/asm-amd64-x86.h> … … 1071 1070 * Initializes the support library. 1072 1071 * 1073 * Each successful call to SUPR3Init() or SUPR3InitEx ()must be countered by a1072 * Each successful call to SUPR3Init() or SUPR3InitEx must be countered by a 1074 1073 * call to SUPR3Term(false). 1075 1074 * … … 1083 1082 * Initializes the support library, extended version. 1084 1083 * 1085 * Each successful call to SUPR3Init() or SUPR3InitEx ()must be countered by a1084 * Each successful call to SUPR3Init() or SUPR3InitEx must be countered by a 1086 1085 * call to SUPR3Term(false). 1087 1086 * … … 1745 1744 */ 1746 1745 SUPR3DECL(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);1766 1746 1767 1747 /** @} */ -
trunk/include/iprt/power.h
r55435 r55436 38 38 */ 39 39 40 #ifdef IN_RING0 41 40 42 /** 41 43 * MP event, see FNRTPOWERNOTIFICATION. … … 43 45 typedef enum RTPOWEREVENT 44 46 { 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,50 47 /** The system will go into suspend mode. */ 51 RTPOWEREVENT_SUSPEND ,48 RTPOWEREVENT_SUSPEND = 1, 52 49 /** The system has resumed. */ 53 50 RTPOWEREVENT_RESUME 54 51 } 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_RING078 52 79 53 /** … … 82 56 * The context this is called in differs a bit from platform to 83 57 * platform, so be careful while in here. 84 *85 * On Linux, the pre-suspend, suspend and resume events fire with preemption86 * enabled on any CPU.87 58 * 88 59 * @param enmEvent The event.
Note:
See TracChangeset
for help on using the changeset viewer.