Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/winsup
diff options
context:
space:
mode:
authorCorinna Vinschen <corinna@vinschen.de>2014-08-20 23:44:09 +0400
committerCorinna Vinschen <corinna@vinschen.de>2014-08-20 23:44:09 +0400
commit854e058b5628276e26c3dd1211a8634af18ad574 (patch)
tree69065e19005be0870e7303f23f96ac6c0b5d3fe2 /winsup
parent905a851912b3f01baa8c797fa6e84081c84b2390 (diff)
* tls_pbuf.h (tmp_pathbuf::tmp_pathbuf): Convert to inline method.
(tmp_pathbuf::~tmp_pathbuf): Ditto. * tls_pbuf.cc (tmp_pathbuf::tmp_pathbuf): Remove here. (tmp_pathbuf::~tmp_pathbuf): Ditto.
Diffstat (limited to 'winsup')
-rw-r--r--winsup/cygwin/ChangeLog7
-rw-r--r--winsup/cygwin/tls_pbuf.cc11
-rw-r--r--winsup/cygwin/tls_pbuf.h13
3 files changed, 18 insertions, 13 deletions
diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog
index d50ef733d..4bf1b04c7 100644
--- a/winsup/cygwin/ChangeLog
+++ b/winsup/cygwin/ChangeLog
@@ -1,3 +1,10 @@
+2014-08-20 Corinna Vinschen <corinna@vinschen.de>
+
+ * tls_pbuf.h (tmp_pathbuf::tmp_pathbuf): Convert to inline method.
+ (tmp_pathbuf::~tmp_pathbuf): Ditto.
+ * tls_pbuf.cc (tmp_pathbuf::tmp_pathbuf): Remove here.
+ (tmp_pathbuf::~tmp_pathbuf): Ditto.
+
2014-08-19 Corinna Vinschen <corinna@vinschen.de>
* dir.cc (dirfd): Per POSIX, return EINVAL on invalid directory stream.
diff --git a/winsup/cygwin/tls_pbuf.cc b/winsup/cygwin/tls_pbuf.cc
index 2f817ec92..c48ca5853 100644
--- a/winsup/cygwin/tls_pbuf.cc
+++ b/winsup/cygwin/tls_pbuf.cc
@@ -22,17 +22,6 @@ tls_pathbuf::destroy ()
free (w_buf[i]);
}
-tmp_pathbuf::tmp_pathbuf ()
-: c_buf_old (tls_pbuf.c_cnt),
- w_buf_old (tls_pbuf.w_cnt)
-{}
-
-tmp_pathbuf::~tmp_pathbuf ()
-{
- tls_pbuf.c_cnt = c_buf_old;
- tls_pbuf.w_cnt = w_buf_old;
-}
-
char *
tmp_pathbuf::c_get ()
{
diff --git a/winsup/cygwin/tls_pbuf.h b/winsup/cygwin/tls_pbuf.h
index 33ee20b79..e98fd60b8 100644
--- a/winsup/cygwin/tls_pbuf.h
+++ b/winsup/cygwin/tls_pbuf.h
@@ -6,13 +6,22 @@ This software is a copyrighted work licensed under the terms of the
Cygwin license. Please consult the file "CYGWIN_LICENSE" for
details. */
+#pragma once
+
class tmp_pathbuf
{
unsigned c_buf_old;
unsigned w_buf_old;
public:
- tmp_pathbuf ();
- ~tmp_pathbuf ();
+ tmp_pathbuf () __attribute__ ((always_inline))
+ : c_buf_old (_my_tls.locals.pathbufs.c_cnt),
+ w_buf_old (_my_tls.locals.pathbufs.w_cnt)
+ {}
+ ~tmp_pathbuf () __attribute__ ((always_inline))
+ {
+ _my_tls.locals.pathbufs.c_cnt = c_buf_old;
+ _my_tls.locals.pathbufs.w_cnt = w_buf_old;
+ }
inline bool check_usage (unsigned c_need, unsigned w_need)
{