summaryrefslogtreecommitdiffstats
path: root/src/DeadlockDetect.h
diff options
context:
space:
mode:
authorAlexander Harkness <me@bearbin.net>2024-11-02 22:27:47 +0100
committerAlexander Harkness <me@bearbin.net>2024-11-02 22:27:47 +0100
commitcb50ec10591c0e0e4b9915e642bc50d3d8d1fd0a (patch)
treef647b20e1823f1846af88e832cf82a4a02e96e69 /src/DeadlockDetect.h
parentImprove clang-format config file, remove automatically enforced code style from contrib guide. (diff)
downloadcuberite-cb50ec10591c0e0e4b9915e642bc50d3d8d1fd0a.tar
cuberite-cb50ec10591c0e0e4b9915e642bc50d3d8d1fd0a.tar.gz
cuberite-cb50ec10591c0e0e4b9915e642bc50d3d8d1fd0a.tar.bz2
cuberite-cb50ec10591c0e0e4b9915e642bc50d3d8d1fd0a.tar.lz
cuberite-cb50ec10591c0e0e4b9915e642bc50d3d8d1fd0a.tar.xz
cuberite-cb50ec10591c0e0e4b9915e642bc50d3d8d1fd0a.tar.zst
cuberite-cb50ec10591c0e0e4b9915e642bc50d3d8d1fd0a.zip
Diffstat (limited to 'src/DeadlockDetect.h')
-rw-r--r--src/DeadlockDetect.h19
1 files changed, 7 insertions, 12 deletions
diff --git a/src/DeadlockDetect.h b/src/DeadlockDetect.h
index 0016313ba..65e5223c9 100644
--- a/src/DeadlockDetect.h
+++ b/src/DeadlockDetect.h
@@ -20,13 +20,11 @@ Once we learn to write crashdumps programmatically, we should do so just before
-class cDeadlockDetect:
- public cIsThread
+class cDeadlockDetect : public cIsThread
{
using Super = cIsThread;
-public:
-
+ public:
cDeadlockDetect();
virtual ~cDeadlockDetect() override;
@@ -42,7 +40,7 @@ public:
/** Removes the CS from the tracking. */
void UntrackCriticalSection(cCriticalSection & a_CS);
-protected:
+ protected:
struct sWorldAge
{
/** Last m_WorldAge that has been detected in this world */
@@ -50,7 +48,7 @@ protected:
/** Number of cycles for which the age has been the same */
int m_NumCyclesSame;
- } ;
+ };
/** Maps world name -> sWorldAge */
typedef std::map<AString, sWorldAge> WorldAges;
@@ -74,7 +72,8 @@ protected:
/** Sets the initial world age. */
void SetWorldAge(const AString & a_WorldName, cTickTimeLong a_Age);
- /** Checks if the world's age has changed, updates the world's stats; calls DeadlockDetected() if deadlock detected. */
+ /** Checks if the world's age has changed, updates the world's stats; calls DeadlockDetected() if deadlock detected.
+ */
void CheckWorldAge(const AString & a_WorldName, cTickTimeLong a_Age);
/** Called when a deadlock is detected in a world. Aborts the server.
@@ -84,8 +83,4 @@ protected:
/** Outputs a listing of the tracked CSs, together with their name and state. */
void ListTrackedCSs();
-} ;
-
-
-
-
+};