* thread.h (pthread_key::set): Inline.

(pthread_key::get): Ditto.
* thread.cc (pthread::set): Delete.
(pthread::get): Ditto.
This commit is contained in:
Christopher Faylor 2005-05-29 02:42:36 +00:00
parent 37b01058e7
commit 65a7ca7b7b
3 changed files with 10 additions and 20 deletions

View File

@ -1,3 +1,10 @@
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.

View File

@ -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 ()
{

View File

@ -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 ();