mirror of
				https://github.com/isledecomp/isle.git
				synced 2025-10-26 01:44:19 +00:00 
			
		
		
		
	 e3d7188ec9
			
		
	
	e3d7188ec9
	
	
	
		
			
			* Use AUTOLOCK macro * MxAutoLock * Remove semicolon Co-authored-by: Anonymous Maarten <madebr@users.noreply.github.com> --------- Co-authored-by: Anonymous Maarten <madebr@users.noreply.github.com>
		
			
				
	
	
		
			18 lines
		
	
	
		
			288 B
		
	
	
	
		
			C++
		
	
	
	
	
	
			
		
		
	
	
			18 lines
		
	
	
		
			288 B
		
	
	
	
		
			C++
		
	
	
	
	
	
| #ifndef MXAUTOLOCK_H
 | |
| #define MXAUTOLOCK_H
 | |
| 
 | |
| #include "mxcriticalsection.h"
 | |
| 
 | |
| #define AUTOLOCK(CS) MxAutoLock lock(&CS)
 | |
| 
 | |
| class MxAutoLock {
 | |
| public:
 | |
| 	MxAutoLock(MxCriticalSection* p_criticalSection);
 | |
| 	~MxAutoLock();
 | |
| 
 | |
| private:
 | |
| 	MxCriticalSection* m_criticalSection;
 | |
| };
 | |
| 
 | |
| #endif // MXAUTOLOCK_H
 |