summaryrefslogtreecommitdiff
path: root/src/mesa/drivers/windows/gdi/InitCritSections.cpp
blob: 69f03b8e47c81480387067efc13cbecdda9f70ea (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
#include "glapi.h"
#include "glThread.h"

#ifdef WIN32

extern "C" _glthread_Mutex OneTimeLock;
extern "C" _glthread_Mutex GenTexturesLock;

extern "C" void FreeAllTSD(void);

class _CriticalSectionInit
{
public:
	static _CriticalSectionInit	m_inst;

	_CriticalSectionInit()
	{
		_glthread_INIT_MUTEX(OneTimeLock);
		_glthread_INIT_MUTEX(GenTexturesLock);
	}

	~_CriticalSectionInit()
	{
		_glthread_DESTROY_MUTEX(OneTimeLock);
		_glthread_DESTROY_MUTEX(GenTexturesLock);
		FreeAllTSD();
	}
};

_CriticalSectionInit _CriticalSectionInit::m_inst;


#endif /* WIN32 */