diff options
author | Corinna Vinschen <corinna@vinschen.de> | 2014-08-20 19:44:09 +0000 |
---|---|---|
committer | Corinna Vinschen <corinna@vinschen.de> | 2014-08-20 19:44:09 +0000 |
commit | 854e058b5628276e26c3dd1211a8634af18ad574 (patch) | |
tree | 69065e19005be0870e7303f23f96ac6c0b5d3fe2 /winsup/cygwin/tls_pbuf.h | |
parent | 905a851912b3f01baa8c797fa6e84081c84b2390 (diff) | |
download | cygnal-854e058b5628276e26c3dd1211a8634af18ad574.tar.gz cygnal-854e058b5628276e26c3dd1211a8634af18ad574.tar.bz2 cygnal-854e058b5628276e26c3dd1211a8634af18ad574.zip |
* 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/cygwin/tls_pbuf.h')
-rw-r--r-- | winsup/cygwin/tls_pbuf.h | 13 |
1 files changed, 11 insertions, 2 deletions
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) { |