Changeset 50391 in vbox
- Timestamp:
- Feb 10, 2014 2:55:45 PM (11 years ago)
- svn:sync-xref-src-repo-rev:
- 92149
- Location:
- trunk/src/VBox/Additions/common/VBoxGuest
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Additions/common/VBoxGuest/VBoxGuest.cpp
r50372 r50391 75 75 #define VBOXGUEST_ACQUIRE_STYLE_EVENTS (VMMDEV_EVENT_DISPLAY_CHANGE_REQUEST | VMMDEV_EVENT_SEAMLESS_MODE_CHANGE_REQUEST) 76 76 77 /** Return the mask of VMM device events that this session is allowed to see, 78 * ergo, all events except those in "acquire" mode which have not been acquired 79 * by this session. */ 77 80 DECLINLINE(uint32_t) VBoxGuestCommonGetHandledEventsLocked(PVBOXGUESTDEVEXT pDevExt, PVBOXGUESTSESSION pSession) 78 81 { … … 80 83 return VMMDEV_EVENT_VALID_EVENT_MASK; 81 84 85 /** @note VMMDEV_EVENT_VALID_EVENT_MASK should actually be the mask of valid 86 * capabilities, but that doesn't affect this code. */ 82 87 uint32_t u32AllowedGuestCaps = pSession->u32AquiredGuestCaps | (VMMDEV_EVENT_VALID_EVENT_MASK & ~pDevExt->u32AcquireModeGuestCaps); 83 88 uint32_t u32CleanupEvents = VBOXGUEST_ACQUIRE_STYLE_EVENTS; … … 98 103 } 99 104 105 /** Puts a capability in "acquire" or "set" mode and returns the mask of 106 * capabilities currently in the other mode. Once a capability has been put in 107 * one of the two modes it can no longer be removed from that mode. */ 100 108 DECLINLINE(bool) VBoxGuestCommonGuestCapsModeSet(PVBOXGUESTDEVEXT pDevExt, uint32_t fCaps, bool fAcquire, uint32_t *pu32OtherVal) 101 109 { … … 2537 2545 } 2538 2546 2547 /** Check whether any unreported VMM device events should be reported to any of 2548 * the currently listening sessions. In addition, report any events in 2549 * @a fGenFakeEvents. 2550 * @note This is called by GUEST_CAPS_ACQUIRE in case any pending events can now 2551 * be dispatched to the session which acquired capabilities. The fake 2552 * events are a hack to wake up threads in that session which would not 2553 * otherwise be woken. 2554 * @todo Why not just use CANCEL_ALL_WAITEVENTS to do the waking up rather than 2555 * adding additional code to the driver? 2556 * @todo Why does acquiring capabilities block and unblock events? Capabilities 2557 * are supposed to control what is reported to the host, we already have 2558 * separate requests for blocking and unblocking events. */ 2539 2559 static void VBoxGuestCommonCheckEvents(PVBOXGUESTDEVEXT pDevExt, PVBOXGUESTSESSION pSession, uint32_t fGenFakeEvents) 2540 2560 { … … 2574 2594 } 2575 2595 2596 /** Switch the capabilities in @a fOrMask to "acquire" mode if they are not 2597 * already in "set" mode. If @a enmFlags is not set to 2598 * VBOXGUESTCAPSACQUIRE_FLAGS_CONFIG_ACQUIRE_MODE, also try to acquire those 2599 * capabilities for the current session and release those in @a fNotFlag. */ 2576 2600 static int VBoxGuestCommonGuestCapsAcquire(PVBOXGUESTDEVEXT pDevExt, PVBOXGUESTSESSION pSession, uint32_t fOrMask, uint32_t fNotMask, VBOXGUESTCAPSACQUIRE_FLAGS enmFlags) 2577 2601 { -
trunk/src/VBox/Additions/common/VBoxGuest/VBoxGuestInternal.h
r50372 r50391 180 180 /** Callback and user data for a kernel mouse handler. */ 181 181 VBoxGuestMouseSetNotifyCallback MouseNotifyCallback; 182 /* list of caps used in acquire mode */ 182 /** Guest capabilities which have been set to "acquire" mode. This means 183 * that only one session can use them at a time, and that they will be 184 * automatically cleaned up if that session exits without doing so. */ 183 185 uint32_t u32AcquireModeGuestCaps; 184 /* list of caps used in set mode */ 186 /** Guest capabilities which have been set to "set" mode. This just means 187 * that they have been blocked from ever being set to "acquire" mode. */ 185 188 uint32_t u32SetModeGuestCaps; 186 /* currently acquired (and reported) guest caps */ 189 /** Mask of all capabilities which are currently acquired by some session 190 * and as such reported to the host. */ 187 191 uint32_t u32GuestCaps; 188 192 } VBOXGUESTDEVEXT; … … 235 239 bool fOpened; 236 240 #endif 237 /* Guest Caps Acquired & Reported by this session */ 241 /** Mask of guest capabilities acquired by this session. These will all be 242 * reported to the host. */ 238 243 uint32_t u32AquiredGuestCaps; 239 244 /** Whether a CANCEL_ALL_WAITEVENTS is pending. This happens when
Note:
See TracChangeset
for help on using the changeset viewer.