summaryrefslogtreecommitdiff
path: root/trace.py
diff options
context:
space:
mode:
authorJosé Fonseca <jfonseca@vmware.com>2010-11-25 16:14:45 +0000
committerJosé Fonseca <jfonseca@vmware.com>2010-11-25 16:14:45 +0000
commit3495713d02b8f9ef28981ac54c22c4c8ee9b2299 (patch)
treea5b6cf7481716429c67e1d0167eb05447a1b84be /trace.py
parentf4b071e057378a0e8cd0a785a5a396f3bb44a59a (diff)
Fix multithreaded reentrancy.
Happens on windows when SetPixelFormat is called...
Diffstat (limited to 'trace.py')
-rw-r--r--trace.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/trace.py b/trace.py
index f7f10b8..677faf3 100644
--- a/trace.py
+++ b/trace.py
@@ -320,19 +320,21 @@ class Tracer:
print ' %s __result;' % function.type
result = '__result = '
self._get_true_pointer(function)
- print ' Log::BeginCall("%s");' % (function.name)
+ print ' unsigned __call = Log::BeginEnter("%s");' % (function.name)
for arg in function.args:
if not arg.output:
self.unwrap_arg(function, arg)
self.dump_arg(function, arg)
+ print ' Log::EndEnter();'
print ' %s%s(%s);' % (result, pvalue, ', '.join([str(arg.name) for arg in function.args]))
+ print ' Log::BeginLeave(__call);'
for arg in function.args:
if arg.output:
self.dump_arg(function, arg)
self.wrap_arg(function, arg)
if function.type is not stdapi.Void:
self.dump_ret(function, "__result")
- print ' Log::EndCall();'
+ print ' Log::EndLeave();'
if function.type is not stdapi.Void:
self.wrap_ret(function, "__result")
print ' return __result;'