nesca/BruteUtils.cpp

36 lines
667 B
C++
Raw Normal View History

2015-03-13 14:27:21 +00:00
#include <BruteUtils.h>
#include "STh.h"
#include "externData.h"
void BruteUtils::BConInc()
{
#if defined(WIN32) || defined(_WIN32) || defined(__WIN32) && !defined(__CYGWIN__)
__asm
{
lock inc BrutingThrds;
};
#else
asm("lock incl BrutingThrds");
#endif
stt->doEmitionChangeBA(QString::number(BrutingThrds));
}
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->doEmitionChangeBA(QString::number(BrutingThrds));
}