mirror of
https://github.com/ChronosX88/nesca.git
synced 2024-11-23 18:52:19 +00:00
34 lines
631 B
C++
34 lines
631 B
C++
#include "BruteUtils.h"
|
|
#include "STh.h"
|
|
#include "externData.h"
|
|
|
|
void BruteUtils::BConInc()
|
|
{
|
|
++BA;
|
|
#if defined(WIN32) || defined(_WIN32) || defined(__WIN32) && !defined(__CYGWIN__)
|
|
__asm
|
|
{
|
|
lock inc BrutingThrds;
|
|
};
|
|
#else
|
|
asm("lock incl BrutingThrds");
|
|
#endif
|
|
stt->doEmitionUpdateArc(gTargets);
|
|
}
|
|
|
|
void BruteUtils::BConDec()
|
|
{
|
|
if(BrutingThrds > 0)
|
|
{
|
|
#if defined(WIN32) || defined(_WIN32) || defined(__WIN32) && !defined(__CYGWIN__)
|
|
__asm
|
|
{
|
|
lock dec BrutingThrds;
|
|
};
|
|
#else
|
|
asm("lock decl BrutingThrds");
|
|
#endif
|
|
}
|
|
stt->doEmitionUpdateArc(gTargets);
|
|
}
|