Change more ace_guard to trinity_guard

This commit is contained in:
megamage
2011-11-08 10:48:49 -05:00
parent 8ba790ef35
commit 462a2b9876
8 changed files with 19 additions and 19 deletions
+3 -3
View File
@@ -322,7 +322,7 @@ void Map::EnsureGridCreated(const GridCoord &p)
{
if (!getNGrid(p.x_coord, p.y_coord))
{
ACE_GUARD(ACE_Thread_Mutex, Guard, Lock);
TRINITY_GUARD(ACE_Thread_Mutex, Lock);
if (!getNGrid(p.x_coord, p.y_coord))
{
sLog->outDebug(LOG_FILTER_MAPS, "Creating grid[%u, %u] for map %u instance %u", p.x_coord, p.y_coord, GetId(), i_InstanceId);
@@ -2282,7 +2282,7 @@ bool InstanceMap::AddToMap(Player* player)
// Is it needed?
{
ACE_GUARD_RETURN(ACE_Thread_Mutex, guard, Lock, false);
TRINITY_GUARD(ACE_Thread_Mutex, Lock);
// Check moved to void WorldSession::HandleMoveWorldportAckOpcode()
//if (!CanEnter(player))
//return false;
@@ -2624,7 +2624,7 @@ bool BattlegroundMap::CanEnter(Player* player)
bool BattlegroundMap::AddToMap(Player* player)
{
{
ACE_GUARD_RETURN(ACE_Thread_Mutex, guard, Lock, false);
TRINITY_GUARD(ACE_Thread_Mutex, Lock);
//Check moved to void WorldSession::HandleMoveWorldportAckOpcode()
//if (!CanEnter(player))
//return false;
+2 -2
View File
@@ -173,7 +173,7 @@ Map* MapInstanced::CreateInstance(const uint32 mapId, Player* player)
InstanceMap* MapInstanced::CreateInstance(uint32 InstanceId, InstanceSave* save, Difficulty difficulty)
{
// load/create a map
ACE_GUARD_RETURN(ACE_Thread_Mutex, Guard, Lock, NULL);
TRINITY_GUARD(ACE_Thread_Mutex, Lock);
// make sure we have a valid map id
const MapEntry* entry = sMapStore.LookupEntry(GetId());
@@ -207,7 +207,7 @@ InstanceMap* MapInstanced::CreateInstance(uint32 InstanceId, InstanceSave* save,
BattlegroundMap* MapInstanced::CreateBattleground(uint32 InstanceId, Battleground* bg)
{
// load/create a map
ACE_GUARD_RETURN(ACE_Thread_Mutex, Guard, Lock, NULL);
TRINITY_GUARD(ACE_Thread_Mutex, Lock);
sLog->outDebug(LOG_FILTER_MAPS, "MapInstanced::CreateBattleground: map bg %d for %d created.", InstanceId, GetId());
+3 -3
View File
@@ -101,7 +101,7 @@ Map* MapManager::_createBaseMap(uint32 id)
if (m == NULL)
{
ACE_GUARD_RETURN(ACE_Thread_Mutex, Guard, Lock, NULL);
TRINITY_GUARD(ACE_Thread_Mutex, Lock);
const MapEntry* entry = sMapStore.LookupEntry(id);
if (entry && entry->Instanceable())
@@ -335,7 +335,7 @@ void MapManager::UnloadAll()
uint32 MapManager::GetNumInstances()
{
ACE_GUARD_RETURN(ACE_Thread_Mutex, Guard, Lock, 0);
TRINITY_GUARD(ACE_Thread_Mutex, Lock);
uint32 ret = 0;
for (MapMapType::iterator itr = i_maps.begin(); itr != i_maps.end(); ++itr)
@@ -352,7 +352,7 @@ uint32 MapManager::GetNumInstances()
uint32 MapManager::GetNumPlayersInInstances()
{
ACE_GUARD_RETURN(ACE_Thread_Mutex, Guard, Lock, 0);
TRINITY_GUARD(ACE_Thread_Mutex, Lock);
uint32 ret = 0;
for (MapMapType::iterator itr = i_maps.begin(); itr != i_maps.end(); ++itr)
+3 -3
View File
@@ -81,7 +81,7 @@ int MapUpdater::deactivate()
int MapUpdater::wait()
{
ACE_GUARD_RETURN(ACE_Thread_Mutex, guard, m_mutex, -1);
TRINITY_GUARD(ACE_Thread_Mutex, m_mutex);
while (pending_requests > 0)
m_condition.wait();
@@ -91,7 +91,7 @@ int MapUpdater::wait()
int MapUpdater::schedule_update(Map& map, ACE_UINT32 diff)
{
ACE_GUARD_RETURN(ACE_Thread_Mutex, guard, m_mutex, -1);
TRINITY_GUARD(ACE_Thread_Mutex, m_mutex);
++pending_requests;
@@ -113,7 +113,7 @@ bool MapUpdater::activated()
void MapUpdater::update_finished()
{
ACE_GUARD(ACE_Thread_Mutex, guard, m_mutex);
TRINITY_GUARD(ACE_Thread_Mutex, m_mutex);
if (pending_requests == 0)
{