Hans Leidekker : qmgr: Don't inline transitionJobState.
Alexandre Julliard
julliard at wine.codeweavers.com
Mon Jun 15 08:49:07 CDT 2015
Module: wine
Branch: master
Commit: bda14f61fc9abc86b03a8e72ed58f861806b831f
URL: http://source.winehq.org/git/wine.git/?a=commit;h=bda14f61fc9abc86b03a8e72ed58f861806b831f
Author: Hans Leidekker <hans at codeweavers.com>
Date: Fri Jun 12 15:07:22 2015 +0200
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 37ef5f9..8ca04ad 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 611896d..2bc5b8b 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__ */
More information about the wine-cvs
mailing list