Skip to content

Commit 2c930f6

Browse files
committed
Fix to teardown check to avoid context
Signed-off-by: Neil R. Spruit <neil.r.spruit@intel.com>
1 parent 407d8b5 commit 2c930f6

File tree

7 files changed

+419
-420
lines changed

7 files changed

+419
-420
lines changed

scripts/templates/libapi.cpp.mako

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ ${th.make_func_name(n, tags, obj)}(
6565
if( ${X}_RESULT_SUCCESS != result )
6666
return result;
6767

68-
if(ze_lib::context->inTeardown) {
68+
if(ze_lib::destruction) {
6969
return ${X}_RESULT_ERROR_UNINITIALIZED;
7070
}
7171

@@ -91,7 +91,7 @@ ${th.make_func_name(n, tags, obj)}(
9191
return result;
9292
}
9393

94-
if(ze_lib::context->inTeardown) {
94+
if(ze_lib::destruction) {
9595
return ${X}_RESULT_ERROR_UNINITIALIZED;
9696
}
9797

@@ -120,7 +120,7 @@ ${th.make_func_name(n, tags, obj)}(
120120
if( ${X}_RESULT_SUCCESS != result )
121121
return result;
122122

123-
if(ze_lib::context->inTeardown) {
123+
if(ze_lib::destruction) {
124124
return ${X}_RESULT_ERROR_UNINITIALIZED;
125125
}
126126

@@ -136,7 +136,7 @@ ${th.make_func_name(n, tags, obj)}(
136136
return result;
137137
});
138138

139-
if(ze_lib::context->inTeardown) {
139+
if(ze_lib::destruction) {
140140
result = ${X}_RESULT_ERROR_UNINITIALIZED;
141141
}
142142

@@ -145,7 +145,7 @@ ${th.make_func_name(n, tags, obj)}(
145145
}
146146
%endif
147147
%else:
148-
if(ze_lib::context->inTeardown) {
148+
if(ze_lib::destruction) {
149149
return ${X}_RESULT_ERROR_UNINITIALIZED;
150150
}
151151

source/lib/ze_lib.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -191,7 +191,7 @@ zelSetDriverTeardown()
191191
{
192192
ze_result_t result = ZE_RESULT_SUCCESS;
193193
if (!ze_lib::destruction) {
194-
ze_lib::context->inTeardown = true;
194+
ze_lib::destruction = true;
195195
}
196196
return result;
197197
}

source/lib/ze_lib.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,6 @@ namespace ze_lib
5959

6060
HMODULE tracing_lib = nullptr;
6161
bool isInitialized = false;
62-
bool inTeardown = false;
6362
bool zesInuse = false;
6463
bool zeInuse = false;
6564
};

0 commit comments

Comments
 (0)