Commit ff42c639 by alokp@chromium.org

Changes to compile translator_glsl on linux.

Review URL: http://codereview.appspot.com/1153043 git-svn-id: https://angleproject.googlecode.com/svn/trunk@254 736b8ea6-26fd-11df-bfd4-992fa37f6226
parent 92680f9c
...@@ -180,16 +180,16 @@ void C_DECL TParseContext::error(TSourceLoc nLine, const char *szReason, const c ...@@ -180,16 +180,16 @@ void C_DECL TParseContext::error(TSourceLoc nLine, const char *szReason, const c
{ {
char szExtraInfo[400]; char szExtraInfo[400];
va_list marker; va_list marker;
va_start(marker, szExtraInfoFormat); va_start(marker, szExtraInfoFormat);
_vsnprintf(szExtraInfo, sizeof(szExtraInfo), szExtraInfoFormat, marker); vsnprintf(szExtraInfo, sizeof(szExtraInfo), szExtraInfoFormat, marker);
/* VC++ format: file(linenum) : error #: 'token' : extrainfo */ /* VC++ format: file(linenum) : error #: 'token' : extrainfo */
infoSink.info.prefix(EPrefixError); infoSink.info.prefix(EPrefixError);
infoSink.info.location(nLine); infoSink.info.location(nLine);
infoSink.info << "'" << szToken << "' : " << szReason << " " << szExtraInfo << "\n"; infoSink.info << "'" << szToken << "' : " << szReason << " " << szExtraInfo << "\n";
va_end(marker); va_end(marker);
++numErrors; ++numErrors;
......
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
#include "compiler/Common.h" #include "compiler/Common.h"
#include "compiler/InitializeGlobals.h" #include "compiler/InitializeGlobals.h"
OS_TLSIndex PoolIndex = TLS_OUT_OF_INDEXES; OS_TLSIndex PoolIndex = OS_INVALID_TLS_INDEX;
void InitializeGlobalPools() void InitializeGlobalPools()
{ {
......
...@@ -14,53 +14,6 @@ ...@@ -14,53 +14,6 @@
#endif #endif
// //
// Thread cleanup
//
//
// Wrapper for Linux call to DetachThread.
// This is required as pthread_cleanup_push() expects the cleanup routine
// to return void.
//
void DetachThreadLinux(void *)
{
DetachThread();
}
//
// Registers cleanup handler, sets cancel type and state, and excecutes
// the thread specific cleanup handler. When OpenGL applications are run with
// the driver code, Linux OS does the thread cleanup.
//
void OS_CleanupThreadData(void)
{
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);
}
//
// Thread Local Storage Operations // Thread Local Storage Operations
// //
OS_TLSIndex OS_AllocTLSIndex() OS_TLSIndex OS_AllocTLSIndex()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment