/* * Copyright (C) 2016+ AzerothCore , released under GNU GPL v2 license, you may redistribute it and/or modify it under version 2 of the License, or (at your option), any later version. * Copyright (C) 2008-2016 TrinityCore * Copyright (C) 2005-2009 MaNGOS */ #ifndef POLICYLOCK_H #define POLICYLOCK_H #include #define GUARD_RETURN(mutex, retval) if (!mutex.try_lock()) \ return retval; \ std::lock_guard guard(mutex, std::adopt_lock) #endif