2002-09-17 Robert Collins <rbtcollins@hotmail.com>
* thread.cc (pthread_key::set): Preserve GetLastError(). Reported by Thomas Pffaf.
This commit is contained in:
parent
f1f1379560
commit
9f06b64aa9
|
@ -1,3 +1,8 @@
|
||||||
|
2002-09-17 Robert Collins <rbtcollins@hotmail.com>
|
||||||
|
|
||||||
|
* thread.cc (pthread_key::set): Preserve GetLastError(). Reported
|
||||||
|
by Thomas Pffaf.
|
||||||
|
|
||||||
2002-09-17 Robert Collins <rbtcollins@hotmail.com>
|
2002-09-17 Robert Collins <rbtcollins@hotmail.com>
|
||||||
|
|
||||||
This work inspires by Thomas Pfaff's pthread_fork patch (1).
|
This work inspires by Thomas Pfaff's pthread_fork patch (1).
|
||||||
|
|
|
@ -1101,8 +1101,10 @@ pthread_key::set (const void *value)
|
||||||
void *
|
void *
|
||||||
pthread_key::get ()
|
pthread_key::get ()
|
||||||
{
|
{
|
||||||
set_errno (0);
|
int savedError = ::GetLastError();
|
||||||
return TlsGetValue (dwTlsIndex);
|
void *result = TlsGetValue (dwTlsIndex);
|
||||||
|
::SetLastError (savedError);
|
||||||
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|
Loading…
Reference in New Issue