Commit bda14f61 authored by Hans Leidekker's avatar Hans Leidekker Committed by Alexandre Julliard

qmgr: Don't inline transitionJobState.

parent 13c3f7ac
......@@ -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__ */
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment