summaryrefslogtreecommitdiffstats
path: root/winsup/cygwin/cygtls.cc
diff options
context:
space:
mode:
authorCorinna Vinschen <corinna@vinschen.de>2014-08-25 19:47:44 +0000
committerCorinna Vinschen <corinna@vinschen.de>2014-08-25 19:47:44 +0000
commit12b244394c45b1fdc1532e83972b3a579ff3bf8f (patch)
tree0f93870c29e631c8befe5bfc624d69ce0be43331 /winsup/cygwin/cygtls.cc
parent5578cc4b73ddb1e99715643ec5768e4402da830f (diff)
downloadcygnal-12b244394c45b1fdc1532e83972b3a579ff3bf8f.tar.gz
cygnal-12b244394c45b1fdc1532e83972b3a579ff3bf8f.tar.bz2
cygnal-12b244394c45b1fdc1532e83972b3a579ff3bf8f.zip
* cygtls.cc (san::leave/x86_64): Implement.
* cygtls.h (class tls_pathbuf): Move counter variables into a union. Add 64 bit element _counters covering both counter variables to optimize save and restore operations. (class san/x86_64): Only store single 64 bit value. (san::san/x86_64): Implement. (san::leave/x86_64): Only declare here, as returns_twice function. Explain why. (class san/i686): Change type of _c_cnt and _w_cnt to uint32_t. (__try/x86_64): Move definition of __sebastian after the first memory barrier. Drop __sebastian.setup call.
Diffstat (limited to 'winsup/cygwin/cygtls.cc')
-rw-r--r--winsup/cygwin/cygtls.cc8
1 files changed, 8 insertions, 0 deletions
diff --git a/winsup/cygwin/cygtls.cc b/winsup/cygwin/cygtls.cc
index 5cc9405eb..2eaae9437 100644
--- a/winsup/cygwin/cygtls.cc
+++ b/winsup/cygwin/cygtls.cc
@@ -200,3 +200,11 @@ _cygtls::remove (DWORD wait)
cygheap->remove_tls (this, wait);
remove_wq (wait);
}
+
+#ifdef __x86_64__
+void san::leave ()
+{
+ /* Restore tls_pathbuf counters in case of error. */
+ _my_tls.locals.pathbufs._counters = _cnt;
+}
+#endif