Put all glslang internals (but not the external interface) into the glslang namespace.
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@22882 e7fa87d3-cd2b-0410-9028-fcbf551c1848
This commit is contained in:
parent
23bdb29eac
commit
b603f918a4
55 changed files with 511 additions and 463 deletions
|
|
@ -50,6 +50,8 @@
|
|||
#error Trying to build a windows specific file in a non windows build.
|
||||
#endif
|
||||
|
||||
namespace glslang {
|
||||
|
||||
//
|
||||
// Thread Local Storage Operations
|
||||
//
|
||||
|
|
@ -97,44 +99,44 @@ bool OS_FreeTLSIndex(OS_TLSIndex nIndex)
|
|||
return false;
|
||||
}
|
||||
|
||||
namespace glslang {
|
||||
HANDLE GlobalLock;
|
||||
HANDLE GlobalLock;
|
||||
|
||||
void InitGlobalLock()
|
||||
{
|
||||
GlobalLock = CreateMutex(0, false, 0);
|
||||
}
|
||||
void InitGlobalLock()
|
||||
{
|
||||
GlobalLock = CreateMutex(0, false, 0);
|
||||
}
|
||||
|
||||
void GetGlobalLock()
|
||||
{
|
||||
WaitForSingleObject(GlobalLock, INFINITE);
|
||||
}
|
||||
void GetGlobalLock()
|
||||
{
|
||||
WaitForSingleObject(GlobalLock, INFINITE);
|
||||
}
|
||||
|
||||
void ReleaseGlobalLock()
|
||||
{
|
||||
ReleaseMutex(GlobalLock);
|
||||
}
|
||||
void ReleaseGlobalLock()
|
||||
{
|
||||
ReleaseMutex(GlobalLock);
|
||||
}
|
||||
|
||||
void* OS_CreateThread(TThreadEntrypoint entry)
|
||||
{
|
||||
return (void*)_beginthreadex(0, 0, entry, 0, 0, 0);
|
||||
//return CreateThread(0, 0, entry, 0, 0, 0);
|
||||
}
|
||||
void* OS_CreateThread(TThreadEntrypoint entry)
|
||||
{
|
||||
return (void*)_beginthreadex(0, 0, entry, 0, 0, 0);
|
||||
//return CreateThread(0, 0, entry, 0, 0, 0);
|
||||
}
|
||||
|
||||
void OS_WaitForAllThreads(void* threads, int numThreads)
|
||||
{
|
||||
WaitForMultipleObjects(numThreads, (HANDLE*)threads, true, INFINITE);
|
||||
}
|
||||
void OS_WaitForAllThreads(void* threads, int numThreads)
|
||||
{
|
||||
WaitForMultipleObjects(numThreads, (HANDLE*)threads, true, INFINITE);
|
||||
}
|
||||
|
||||
void OS_Sleep(int milliseconds)
|
||||
{
|
||||
Sleep(milliseconds);
|
||||
}
|
||||
void OS_Sleep(int milliseconds)
|
||||
{
|
||||
Sleep(milliseconds);
|
||||
}
|
||||
|
||||
void OS_DumpMemoryCounters()
|
||||
{
|
||||
PROCESS_MEMORY_COUNTERS counters;
|
||||
GetProcessMemoryInfo(GetCurrentProcess(), &counters, sizeof(counters));
|
||||
printf("Working set size: %d\n", counters.WorkingSetSize);
|
||||
}
|
||||
};
|
||||
void OS_DumpMemoryCounters()
|
||||
{
|
||||
PROCESS_MEMORY_COUNTERS counters;
|
||||
GetProcessMemoryInfo(GetCurrentProcess(), &counters, sizeof(counters));
|
||||
printf("Working set size: %d\n", counters.WorkingSetSize);
|
||||
}
|
||||
|
||||
} // namespace glslang
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue