mirror of
https://github.com/RPCS3/glslang.git
synced 2024-11-23 19:29:44 +00:00
Remove the unused OS_CleanupThreadData
This commit is contained in:
parent
557f31d8fe
commit
91ff31a64e
@ -56,52 +56,6 @@ namespace glslang {
|
||||
// Thread cleanup
|
||||
//
|
||||
|
||||
//
|
||||
// Wrapper for Linux call to DetachThread. This is required as pthread_cleanup_push() expects
|
||||
// the cleanup routine to return void.
|
||||
//
|
||||
static void DetachThreadLinux(void *)
|
||||
{
|
||||
DetachThread();
|
||||
}
|
||||
|
||||
//
|
||||
// Registers cleanup handler, sets cancel type and state, and executes the thread specific
|
||||
// cleanup handler. This function will be called in the Standalone.cpp for regression
|
||||
// testing. When OpenGL applications are run with the driver code, Linux OS does the
|
||||
// thread cleanup.
|
||||
//
|
||||
void OS_CleanupThreadData(void)
|
||||
{
|
||||
#if defined(__ANDROID__) || defined(__Fuchsia__)
|
||||
DetachThreadLinux(NULL);
|
||||
#else
|
||||
int old_cancel_state, old_cancel_type;
|
||||
void *cleanupArg = NULL;
|
||||
|
||||
//
|
||||
// Set thread cancel state and push cleanup handler.
|
||||
//
|
||||
pthread_setcancelstate(PTHREAD_CANCEL_ENABLE, &old_cancel_state);
|
||||
pthread_cleanup_push(DetachThreadLinux, (void *) cleanupArg);
|
||||
|
||||
//
|
||||
// Put the thread in deferred cancellation mode.
|
||||
//
|
||||
pthread_setcanceltype(PTHREAD_CANCEL_DEFERRED, &old_cancel_type);
|
||||
|
||||
//
|
||||
// Pop cleanup handler and execute it prior to unregistering the cleanup handler.
|
||||
//
|
||||
pthread_cleanup_pop(1);
|
||||
|
||||
//
|
||||
// Restore the thread's previous cancellation mode.
|
||||
//
|
||||
pthread_setcanceltype(old_cancel_state, NULL);
|
||||
#endif
|
||||
}
|
||||
|
||||
//
|
||||
// Thread Local Storage Operations
|
||||
//
|
||||
|
@ -54,8 +54,6 @@ void ReleaseGlobalLock();
|
||||
|
||||
typedef unsigned int (*TThreadEntrypoint)(void*);
|
||||
|
||||
void OS_CleanupThreadData(void);
|
||||
|
||||
void OS_DumpMemoryCounters();
|
||||
|
||||
} // end namespace glslang
|
||||
|
Loading…
Reference in New Issue
Block a user