Skip to content

Commit b537a6a

Browse files
committed
threading: remove obsolete critsect macros
1 parent 0d0e0a3 commit b537a6a

File tree

1 file changed

+0
-20
lines changed

1 file changed

+0
-20
lines changed

src/sync.h

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -39,12 +39,6 @@ LOCK2(mutex1, mutex2);
3939
4040
TRY_LOCK(mutex, name);
4141
std::unique_lock<std::recursive_mutex> name(mutex, std::try_to_lock_t);
42-
43-
ENTER_CRITICAL_SECTION(mutex); // no RAII
44-
mutex.lock();
45-
46-
LEAVE_CRITICAL_SECTION(mutex); // no RAII
47-
mutex.unlock();
4842
*/
4943

5044
///////////////////////////////
@@ -270,20 +264,6 @@ inline MutexType* MaybeCheckNotHeld(MutexType* m) LOCKS_EXCLUDED(m) LOCK_RETURNE
270264
#define TRY_LOCK(cs, name) UniqueLock name(LOCK_ARGS(cs), true)
271265
#define WAIT_LOCK(cs, name) UniqueLock name(LOCK_ARGS(cs))
272266

273-
#define ENTER_CRITICAL_SECTION(cs) \
274-
{ \
275-
EnterCritical(#cs, __FILE__, __LINE__, &cs); \
276-
(cs).lock(); \
277-
}
278-
279-
#define LEAVE_CRITICAL_SECTION(cs) \
280-
{ \
281-
std::string lockname; \
282-
CheckLastCritical((void*)(&cs), lockname, #cs, __FILE__, __LINE__); \
283-
(cs).unlock(); \
284-
LeaveCritical(); \
285-
}
286-
287267
//! Run code while locking a mutex.
288268
//!
289269
//! Examples:

0 commit comments

Comments
 (0)