Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
G
glslang
Manage
Activity
Members
Plan
Wiki
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Package Registry
Model registry
Operate
Terraform modules
Analyze
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
CodeLinaro
public-release-test-restored
platform
external
deqp-deps
glslang
Commits
74bde987
Commit
74bde987
authored
7 years ago
by
John Kessenich
Browse files
Options
Downloads
Patches
Plain Diff
Memory: Restore unused interfaces, in case other tools called them.
parent
94f28eb6
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
OGLCompilersDLL/InitializeDll.cpp
+47
-0
47 additions, 0 deletions
OGLCompilersDLL/InitializeDll.cpp
OGLCompilersDLL/InitializeDll.h
+2
-0
2 additions, 0 deletions
OGLCompilersDLL/InitializeDll.h
glslang/OSDependent/Unix/ossource.cpp
+1
-0
1 addition, 0 deletions
glslang/OSDependent/Unix/ossource.cpp
with
50 additions
and
0 deletions
OGLCompilersDLL/InitializeDll.cpp
+
47
−
0
View file @
74bde987
...
...
@@ -115,4 +115,51 @@ bool InitThread()
return
true
;
}
// Not necessary to call this: InitThread() is reentrant, and the need
// to do per thread tear down has been removed.
//
// This is kept, with memory management removed, to satisfy any exiting
// calls to it that rely on it.
bool
DetachThread
()
{
bool
success
=
true
;
if
(
ThreadInitializeIndex
==
OS_INVALID_TLS_INDEX
)
return
true
;
//
// Function is re-entrant and this thread may not have been initialized.
//
if
(
OS_GetTLSValue
(
ThreadInitializeIndex
)
!=
0
)
{
if
(
!
OS_SetTLSValue
(
ThreadInitializeIndex
,
(
void
*
)
0
))
{
assert
(
0
&&
"DetachThread(): Unable to clear init flag."
);
success
=
false
;
}
}
return
success
;
}
// Not necessary to call this: InitProcess() is reentrant.
//
// This is kept, with memory management removed, to satisfy any exiting
// calls to it that rely on it.
//
// Users of glslang should call shFinalize() or glslang::FinalizeProcess() for
// process-scoped memory tear down.
bool
DetachProcess
()
{
bool
success
=
true
;
if
(
ThreadInitializeIndex
==
OS_INVALID_TLS_INDEX
)
return
true
;
success
=
DetachThread
();
OS_FreeTLSIndex
(
ThreadInitializeIndex
);
ThreadInitializeIndex
=
OS_INVALID_TLS_INDEX
;
return
success
;
}
}
// end namespace glslang
This diff is collapsed.
Click to expand it.
OGLCompilersDLL/InitializeDll.h
+
2
−
0
View file @
74bde987
...
...
@@ -40,6 +40,8 @@ namespace glslang {
bool
InitProcess
();
bool
InitThread
();
bool
DetachThread
();
// not called from standalone, perhaps other tools rely on parts of it
bool
DetachProcess
();
// not called from standalone, perhaps other tools rely on parts of it
}
// end namespace glslang
...
...
This diff is collapsed.
Click to expand it.
glslang/OSDependent/Unix/ossource.cpp
+
1
−
0
View file @
74bde987
...
...
@@ -56,6 +56,7 @@ namespace glslang {
//
static
void
DetachThreadLinux
(
void
*
)
{
DetachThread
();
}
//
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment