Skip to content

Commit a1461ce

Browse files
author
nitrocaster
committed
Refactor and update sync primitives.
1 parent f0109a3 commit a1461ce

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

58 files changed

+231
-218
lines changed

src/Layers/xrRender/DetailManager.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,7 @@ class ECORE_API CDetailManager
183183
void Render ();
184184

185185
/// MT stuff
186-
xrCriticalSection MT;
186+
Lock MT;
187187
volatile u32 m_frame_calc;
188188
volatile u32 m_frame_rendered;
189189

src/Layers/xrRender/HOM.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ class CHOM
3939
Fmatrix m_xform;
4040
Fmatrix m_xform_01;
4141

42-
xrCriticalSection MT;
42+
Lock MT;
4343
volatile u32 MT_frame_rendered;
4444
HOMStatistics stats;
4545

src/Layers/xrRender/SkeletonCustom.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
#include "xrEngine/Render.h"
1010
#endif
1111
int psSkeletonUpdate = 32;
12-
xrCriticalSection UCalc_Mutex
12+
Lock UCalc_Mutex
1313
#ifdef PROFILE_CRITICAL_SECTIONS
1414
(MUTEX_PROFILE_ID(UCalc_Mutex))
1515
#endif // PROFILE_CRITICAL_SECTIONS

src/Layers/xrRender/SkeletonCustom.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
#include "Include/xrRender/Kinematics.h"
88

99
// consts
10-
extern xrCriticalSection UCalc_Mutex ;
10+
extern Lock UCalc_Mutex ;
1111

1212
// refs
1313
class CKinematics;

src/Layers/xrRender/WallmarksEngine.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ class CWallmarksEngine
3939
CDB::Collector sml_collector;
4040
xr_vector<u32> sml_adjacency;
4141

42-
xrCriticalSection lock;
42+
Lock lock;
4343
private:
4444
wm_slot* FindSlot (ref_shader shader);
4545
wm_slot* AppendSlot (ref_shader shader);

src/utils/xrAI/game_spawn_constructor.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ class CGameSpawnConstructor {
4141
};
4242

4343
private:
44-
xrCriticalSection m_critical_section;
44+
Lock m_critical_section;
4545
ALife::_SPAWN_ID m_spawn_id;
4646
CThreadManager m_thread_manager;
4747
CSpawnHeader m_spawn_header;

src/utils/xrAI/profiler.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ class CProfiler {
6262
PORTIONS m_portions;
6363
TIMERS m_timers;
6464
bool m_actual;
65-
xrCriticalSection m_section;
65+
Lock m_section;
6666
u32 m_call_count;
6767

6868
protected:

src/utils/xrLC/OGF_Face.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -256,7 +256,7 @@ void OGF::Optimize ()
256256

257257

258258
// Make Progressive
259-
xrCriticalSection progressive_cs
259+
Lock progressive_cs
260260
#ifdef PROFILE_CRITICAL_SECTIONS
261261
(MUTEX_PROFILE_ID(progressive_cs))
262262
#endif // PROFILE_CRITICAL_SECTIONS

src/utils/xrLC/xrLight.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,12 @@
66
#include "utils/xrLC_Light/xrLC_GlobalData.h"
77
#include "utils/xrLC_Light/xrLightVertex.h"
88

9-
#include "xrCore/Threading/xrSyncronize.h"
9+
#include "xrCore/Threading/Lock.hpp"
1010
#include "net.h"
1111

1212
#include "utils/xrLC_Light/lcnet_task_manager.h"
1313
#include "utils/xrLC_Light/mu_model_light.h"
14-
xrCriticalSection task_CS
14+
Lock task_CS
1515
#ifdef PROFILE_CRITICAL_SECTIONS
1616
(MUTEX_PROFILE_ID(task_C_S))
1717
#endif // PROFILE_CRITICAL_SECTIONS

src/utils/xrLC/xrPhase_GI.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
#include "utils/xrLC_Light/xrLC_GlobalData.h"
66
#include "utils/xrLC_Light/xrface.h"
77

8-
#include "xrCore/Threading/xrSyncronize.h"
8+
#include "xrCore/Threading/Lock.hpp"
99
#include "xrCDB/xrCDB.h"
1010

1111

@@ -17,7 +17,7 @@ const float gi_clip = 0.05f;
1717
const u32 gi_maxlevel = 4;
1818
//////////////////////////////////////////////////////////////////////////
1919
static xr_vector<R_Light>* task;
20-
xrCriticalSection task_cs
20+
Lock task_cs
2121
#ifdef PROFILE_CRITICAL_SECTIONS
2222
(MUTEX_PROFILE_ID(task_cs))
2323
#endif // PROFILE_CRITICAL_SECTIONS

0 commit comments

Comments
 (0)