Show a number when printing a potential deadlock

This commit is contained in:
Alex 2022-11-01 01:53:55 +02:00
parent 59f4470fb4
commit f3cfc623d8
Signed by untrusted user who does not match committer: enderice2
GPG Key ID: EACC3AD603BAB4DD

View File

@ -2,10 +2,13 @@
#include <debug.h>
static unsigned long DeadLocks = 0;
extern "C" void DeadLockHandler(LockClass *Lock)
{
warn("Potential deadlock in lock '%s' held by '%s'",
warn("Potential deadlock in lock '%s' held by '%s' (%ld)",
Lock->GetLockData()->AttemptingToGet,
Lock->GetLockData()->CurrentHolder);
Lock->GetLockData()->CurrentHolder,
DeadLocks++);
// TODO: Print on screen too.
}
}