From bda14f61fc9abc86b03a8e72ed58f861806b831f Mon Sep 17 00:00:00 2001 From: Hans Leidekker Date: Fri, 12 Jun 2015 15:07:22 +0200 Subject: [PATCH] qmgr: Don't inline transitionJobState. --- dlls/qmgr/job.c | 14 ++++++++++++++ dlls/qmgr/qmgr.h | 16 +--------------- 2 files changed, 15 insertions(+), 15 deletions(-) diff --git a/dlls/qmgr/job.c b/dlls/qmgr/job.c index 37ef5f9615d..8ca04ad6bd0 100644 --- a/dlls/qmgr/job.c +++ b/dlls/qmgr/job.c @@ -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; diff --git a/dlls/qmgr/qmgr.h b/dlls/qmgr/qmgr.h index 611896d97e5..2bc5b8b9615 100644 --- a/dlls/qmgr/qmgr.h +++ b/dlls/qmgr/qmgr.h @@ -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__ */