gthr-win32.h (__gthread_objc_thread_get_data): Save and restore Win32 LastError.

* gthr-win32.h (__gthread_objc_thread_get_data): Save and restore Win32
LastError.
(__gthread_getspecific): Ditto.

From-SVN: r38932
This commit is contained in:
Thomas Pfaff 2001-01-12 01:23:46 +00:00 committed by Christopher Faylor
parent 0fc39d8ad7
commit 69e905c854
2 changed files with 26 additions and 2 deletions

View File

@ -1,3 +1,9 @@
2001-01-10 Thomas Pfaff <tpfaff@gmx.net>
* gthr-win32.h (__gthread_objc_thread_get_data): Save and restore Win32
LastError.
(__gthread_getspecific): Ditto.
Fri Jan 12 00:04:00 MET 2001 Jan Hubicka <jh@suse.cz>
* i386.c (ix86_comparison_operator, fcmov_comparison_operator,

View File

@ -204,7 +204,16 @@ __gthread_objc_thread_set_data(void *value)
void *
__gthread_objc_thread_get_data(void)
{
return TlsGetValue(__gthread_objc_data_tls); /* Return thread data. */
DWORD lasterror;
void *ptr;
lasterror = GetLastError();
ptr = TlsGetValue(__gthread_objc_data_tls); /* Return thread data. */
SetLastError( lasterror );
return ptr;
}
/* Backend mutex functions */
@ -413,7 +422,16 @@ __gthread_key_delete (__gthread_key_t key)
static inline void *
__gthread_getspecific (__gthread_key_t key)
{
return TlsGetValue (key);
DWORD lasterror;
void *ptr;
lasterror = GetLastError();
ptr = TlsGetValue(key);
SetLastError( lasterror );
return ptr;
}
static inline int