Eric Pouech eric.pouech@wanadoo.fr writes:
typedef struct tagWINE_PLAYSOUND {
- HANDLE hThread;
- HANDLE hReadyEvent;
- BOOL bStop;
- LPCWSTR pszSound;
- HMODULE hMod;
- DWORD fdwSound;
- BOOL bLoop;
- BOOL bAlloc;
- volatile BOOL bLoop : 1,
bAlloc : 1;
- LPCWSTR pszSound;
- HMODULE hMod;
- DWORD fdwSound;
- struct tagWINE_PLAYSOUND* lpNext;
} WINE_PLAYSOUND, *LPWINE_PLAYSOUND;
If you need to make variables volatile, something is wrong with the synchronization, and volatile is the wrong fix (especially on a bit field where updates can't be atomic). What is this supposed to fix?
If you need to make variables volatile, something is wrong with the synchronization, and volatile is the wrong fix (especially on a bit field where updates can't be atomic). What is this supposed to fix?
the volatile is no longer of use (sync is made with an event), so you can safely remove the volatile keyword here A+