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
diff options
context:
space:
mode:
authorChristopher Faylor <me@cgf.cx>2005-05-29 06:42:36 +0400
committerChristopher Faylor <me@cgf.cx>2005-05-29 06:42:36 +0400
commit65a7ca7b7b59302ee06374681bdf907c8bad8f72 (patch)
tree01b729cdbc2e0ab1a58171e5ee68010f17d50f3f /winsup/cygwin
parent37b01058e74d4a94febd6267ea66e0d1ad8495b6 (diff)
* thread.h (pthread_key::set): Inline.
(pthread_key::get): Ditto. * thread.cc (pthread::set): Delete. (pthread::get): Ditto.
Diffstat (limited to 'winsup/cygwin')
-rw-r--r--winsup/cygwin/ChangeLog7
-rw-r--r--winsup/cygwin/thread.cc17
-rw-r--r--winsup/cygwin/thread.h6
3 files changed, 10 insertions, 20 deletions
diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog
index 7bf04f502..c5159ef37 100644
--- a/winsup/cygwin/ChangeLog
+++ b/winsup/cygwin/ChangeLog
@@ -1,5 +1,12 @@
2005-05-28 Christopher Faylor <cgf@timesys.com>
+ * thread.h (pthread_key::set): Inline.
+ (pthread_key::get): Ditto.
+ * thread.cc (pthread::set): Delete.
+ (pthread::get): Ditto.
+
+2005-05-28 Christopher Faylor <cgf@timesys.com>
+
* cygwin.din: Remove signal front end from pthread_[gs]etspecific.
2005-05-28 Christopher Faylor <cgf@timesys.com>
diff --git a/winsup/cygwin/thread.cc b/winsup/cygwin/thread.cc
index 796453728..e2ffe8e12 100644
--- a/winsup/cygwin/thread.cc
+++ b/winsup/cygwin/thread.cc
@@ -1367,23 +1367,6 @@ pthread_key::~pthread_key ()
}
}
-int
-pthread_key::set (const void *value)
-{
- /* the OS function doesn't perform error checking */
- TlsSetValue (tls_index, (void *) value);
- return 0;
-}
-
-void *
-pthread_key::get () const
-{
- int saved_error = ::GetLastError ();
- void *result = TlsGetValue (tls_index);
- ::SetLastError (saved_error);
- return result;
-}
-
void
pthread_key::_fixup_before_fork ()
{
diff --git a/winsup/cygwin/thread.h b/winsup/cygwin/thread.h
index 712e36f03..be2ada6bc 100644
--- a/winsup/cygwin/thread.h
+++ b/winsup/cygwin/thread.h
@@ -209,12 +209,12 @@ protected:
class pthread_key: public verifyable_object
{
+ DWORD tls_index;
public:
static bool is_good_object (pthread_key_t const *);
- DWORD tls_index;
- int set (const void *);
- void *get () const;
+ int set (const void *value) {TlsSetValue (tls_index, (void *) value); return 0;}
+ void *get () const {return TlsGetValue (tls_index);}
pthread_key (void (*)(void *));
~pthread_key ();