aboutsummaryrefslogtreecommitdiff
path: root/mp/src/utils/common/threads.h
diff options
context:
space:
mode:
authorJørgen P. Tjernø <[email protected]>2013-12-02 19:31:46 -0800
committerJørgen P. Tjernø <[email protected]>2013-12-02 19:46:31 -0800
commitf56bb35301836e56582a575a75864392a0177875 (patch)
treede61ddd39de3e7df52759711950b4c288592f0dc /mp/src/utils/common/threads.h
parentMark some more files as text. (diff)
downloadsource-sdk-2013-f56bb35301836e56582a575a75864392a0177875.tar.xz
source-sdk-2013-f56bb35301836e56582a575a75864392a0177875.zip
Fix line endings. WHAMMY.
Diffstat (limited to 'mp/src/utils/common/threads.h')
-rw-r--r--mp/src/utils/common/threads.h130
1 files changed, 65 insertions, 65 deletions
diff --git a/mp/src/utils/common/threads.h b/mp/src/utils/common/threads.h
index e29e9aab..0908b67a 100644
--- a/mp/src/utils/common/threads.h
+++ b/mp/src/utils/common/threads.h
@@ -1,65 +1,65 @@
-//========= Copyright Valve Corporation, All rights reserved. ============//
-//
-// Purpose:
-//
-// $Workfile: $
-// $Date: $
-//
-//-----------------------------------------------------------------------------
-// $Log: $
-//
-// $NoKeywords: $
-//=============================================================================//
-
-#ifndef THREADS_H
-#define THREADS_H
-#pragma once
-
-
-// Arrays that are indexed by thread should always be MAX_TOOL_THREADS+1
-// large so THREADINDEX_MAIN can be used from the main thread.
-#define MAX_TOOL_THREADS 16
-#define THREADINDEX_MAIN (MAX_TOOL_THREADS)
-
-
-extern int numthreads;
-
-// If set to true, then all the threads that are created are low priority.
-extern bool g_bLowPriorityThreads;
-
-typedef void (*ThreadWorkerFn)( int iThread, int iWorkItem );
-typedef void (*RunThreadsFn)( int iThread, void *pUserData );
-
-
-enum ERunThreadsPriority
-{
- k_eRunThreadsPriority_UseGlobalState=0, // Default.. uses g_bLowPriorityThreads to decide what to set the priority to.
- k_eRunThreadsPriority_Normal, // Doesn't touch thread priorities.
- k_eRunThreadsPriority_Idle // Sets threads to idle priority.
-};
-
-
-// Put the process into an idle priority class so it doesn't hog the UI.
-void SetLowPriority();
-
-void ThreadSetDefault (void);
-int GetThreadWork (void);
-
-void RunThreadsOnIndividual ( int workcnt, qboolean showpacifier, ThreadWorkerFn fn );
-
-void RunThreadsOn ( int workcnt, qboolean showpacifier, RunThreadsFn fn, void *pUserData=NULL );
-
-// This version doesn't track work items - it just runs your function and waits for it to finish.
-void RunThreads_Start( RunThreadsFn fn, void *pUserData, ERunThreadsPriority ePriority=k_eRunThreadsPriority_UseGlobalState );
-void RunThreads_End();
-
-void ThreadLock (void);
-void ThreadUnlock (void);
-
-
-#ifndef NO_THREAD_NAMES
-#define RunThreadsOn(n,p,f) { if (p) printf("%-20s ", #f ":"); RunThreadsOn(n,p,f); }
-#define RunThreadsOnIndividual(n,p,f) { if (p) printf("%-20s ", #f ":"); RunThreadsOnIndividual(n,p,f); }
-#endif
-
-#endif // THREADS_H
+//========= Copyright Valve Corporation, All rights reserved. ============//
+//
+// Purpose:
+//
+// $Workfile: $
+// $Date: $
+//
+//-----------------------------------------------------------------------------
+// $Log: $
+//
+// $NoKeywords: $
+//=============================================================================//
+
+#ifndef THREADS_H
+#define THREADS_H
+#pragma once
+
+
+// Arrays that are indexed by thread should always be MAX_TOOL_THREADS+1
+// large so THREADINDEX_MAIN can be used from the main thread.
+#define MAX_TOOL_THREADS 16
+#define THREADINDEX_MAIN (MAX_TOOL_THREADS)
+
+
+extern int numthreads;
+
+// If set to true, then all the threads that are created are low priority.
+extern bool g_bLowPriorityThreads;
+
+typedef void (*ThreadWorkerFn)( int iThread, int iWorkItem );
+typedef void (*RunThreadsFn)( int iThread, void *pUserData );
+
+
+enum ERunThreadsPriority
+{
+ k_eRunThreadsPriority_UseGlobalState=0, // Default.. uses g_bLowPriorityThreads to decide what to set the priority to.
+ k_eRunThreadsPriority_Normal, // Doesn't touch thread priorities.
+ k_eRunThreadsPriority_Idle // Sets threads to idle priority.
+};
+
+
+// Put the process into an idle priority class so it doesn't hog the UI.
+void SetLowPriority();
+
+void ThreadSetDefault (void);
+int GetThreadWork (void);
+
+void RunThreadsOnIndividual ( int workcnt, qboolean showpacifier, ThreadWorkerFn fn );
+
+void RunThreadsOn ( int workcnt, qboolean showpacifier, RunThreadsFn fn, void *pUserData=NULL );
+
+// This version doesn't track work items - it just runs your function and waits for it to finish.
+void RunThreads_Start( RunThreadsFn fn, void *pUserData, ERunThreadsPriority ePriority=k_eRunThreadsPriority_UseGlobalState );
+void RunThreads_End();
+
+void ThreadLock (void);
+void ThreadUnlock (void);
+
+
+#ifndef NO_THREAD_NAMES
+#define RunThreadsOn(n,p,f) { if (p) printf("%-20s ", #f ":"); RunThreadsOn(n,p,f); }
+#define RunThreadsOnIndividual(n,p,f) { if (p) printf("%-20s ", #f ":"); RunThreadsOnIndividual(n,p,f); }
+#endif
+
+#endif // THREADS_H