Changeset 37870 in vbox for trunk/src/VBox/Additions/WINNT/Graphics/Wine/wined3d/vboxsharedrc.h
- Timestamp:
- Jul 11, 2011 1:17:25 PM (14 years ago)
- svn:sync-xref-src-repo-rev:
- 72767
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Additions/WINNT/Graphics/Wine/wined3d/vboxsharedrc.h
r37840 r37870 19 19 #define VBOXSHRC_F_SHARED 0x00000001 /* shared rc */ 20 20 #define VBOXSHRC_F_SHARED_OPENED 0x00000002 /* if set shared rc is opened, otherwise it is created */ 21 #define VBOXSHRC_F_INITIALIZED 0x00000004 /* set once shared rc is initialized */22 21 23 22 #define VBOXSHRC_GET_SHAREFLAFS(_o) ((_o)->resource.sharerc_flags) 24 #define VBOXSHRC_GET_SHAREHANDLE(_o) ((_o)->resource.sharerc_handle) 25 #define VBOXSHRC_SET_SHAREHANDLE(_o, _h) ((_o)->resource.sharerc_handle = (_h)) 26 #define VBOXSHRC_SET_INITIALIZED(_o) (VBOXSHRC_GET_SHAREFLAFS(_o) |= VBOXSHRC_F_INITIALIZED) 23 #define VBOXSHRC_GET_SHAREHANDLE(_o) ((HANDLE)(_o)->resource.sharerc_handle) 24 #define VBOXSHRC_SET_SHAREHANDLE(_o, _h) ((_o)->resource.sharerc_handle = (DWORD)(_h)) 27 25 #define VBOXSHRC_COPY_SHAREDATA(_oDst, _oSrc) do { \ 28 26 VBOXSHRC_GET_SHAREFLAFS(_oDst) = VBOXSHRC_GET_SHAREFLAFS(_oSrc); \ … … 33 31 #define VBOXSHRC_IS_SHARED(_o) (!!(VBOXSHRC_GET_SHAREFLAFS(_o) & VBOXSHRC_F_SHARED)) 34 32 #define VBOXSHRC_IS_SHARED_OPENED(_o) (!!(VBOXSHRC_GET_SHAREFLAFS(_o) & VBOXSHRC_F_SHARED_OPENED)) 35 #define VBOXSHRC_IS_ INITIALIZED(_o) (!!(VBOXSHRC_GET_SHAREFLAFS(_o) & VBOXSHRC_F_INITIALIZED))33 #define VBOXSHRC_IS_SHARED_UNLOCKED(_o) (VBOXSHRC_IS_SHARED(_o) && !VBOXSHRC_IS_LOCKED(_o)) 36 34 35 #define VBOXSHRC_LOCK(_o) do{ \ 36 Assert(VBOXSHRC_IS_SHARED(_o)); \ 37 ++(_o)->resource.sharerc_locks; \ 38 } while (0) 39 #define VBOXSHRC_UNLOCK(_o) do{ \ 40 Assert(VBOXSHRC_IS_SHARED(_o)); \ 41 --(_o)->resource.sharerc_locks; \ 42 Assert((_o)->resource.sharerc_locks < UINT32_MAX/2); \ 43 } while (0) 44 #define VBOXSHRC_IS_LOCKED(_o) ( \ 45 !!((_o)->resource.sharerc_locks) \ 46 ) 37 47 #ifdef VBOX_WINE_WITH_IPRT 38 48 # include <iprt/assert.h>
Note:
See TracChangeset
for help on using the changeset viewer.