qmgr: Don't inline transitionJobState.
This commit is contained in:
parent
13c3f7ac2b
commit
bda14f61fc
|
@ -27,6 +27,20 @@
|
|||
|
||||
WINE_DEFAULT_DEBUG_CHANNEL(qmgr);
|
||||
|
||||
BOOL transitionJobState(BackgroundCopyJobImpl *job, BG_JOB_STATE from, BG_JOB_STATE to)
|
||||
{
|
||||
BOOL ret = FALSE;
|
||||
|
||||
EnterCriticalSection(&globalMgr.cs);
|
||||
if (job->state == from)
|
||||
{
|
||||
job->state = to;
|
||||
ret = TRUE;
|
||||
}
|
||||
LeaveCriticalSection(&globalMgr.cs);
|
||||
return ret;
|
||||
}
|
||||
|
||||
struct copy_error
|
||||
{
|
||||
IBackgroundCopyError IBackgroundCopyError_iface;
|
||||
|
|
|
@ -113,6 +113,7 @@ HRESULT EnumBackgroundCopyFilesConstructor(BackgroundCopyJobImpl*, IEnumBackgrou
|
|||
DWORD WINAPI fileTransfer(void *param) DECLSPEC_HIDDEN;
|
||||
void processJob(BackgroundCopyJobImpl *job) DECLSPEC_HIDDEN;
|
||||
BOOL processFile(BackgroundCopyFileImpl *file, BackgroundCopyJobImpl *job) DECLSPEC_HIDDEN;
|
||||
BOOL transitionJobState(BackgroundCopyJobImpl *job, BG_JOB_STATE from, BG_JOB_STATE to) DECLSPEC_HIDDEN;
|
||||
|
||||
/* Little helper functions */
|
||||
static inline WCHAR *strdupW(const WCHAR *src)
|
||||
|
@ -142,19 +143,4 @@ static inline HRESULT return_strval(const WCHAR *str, WCHAR **ret)
|
|||
return S_OK;
|
||||
}
|
||||
|
||||
static inline BOOL
|
||||
transitionJobState(BackgroundCopyJobImpl *job, BG_JOB_STATE fromState,
|
||||
BG_JOB_STATE toState)
|
||||
{
|
||||
BOOL rv = FALSE;
|
||||
EnterCriticalSection(&globalMgr.cs);
|
||||
if (job->state == fromState)
|
||||
{
|
||||
job->state = toState;
|
||||
rv = TRUE;
|
||||
}
|
||||
LeaveCriticalSection(&globalMgr.cs);
|
||||
return rv;
|
||||
}
|
||||
|
||||
#endif /* __QMGR_H__ */
|
||||
|
|
Loading…
Reference in New Issue