* gthr-win32.h (__gthread_objc_thread_get_data): Save and restore Win32
LastError.
(__gthread_getspecific): Ditto.
From-SVN: r38932
+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,
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 */
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