Permit empth_self() before empth_init()
Next commit wants this.
This commit is contained in:
parent
3d7383c548
commit
fc64b4fa83
3 changed files with 6 additions and 7 deletions
|
@ -467,9 +467,7 @@ bad:
|
|||
empth_t *
|
||||
empth_self(void)
|
||||
{
|
||||
empth_t *pThread = TlsGetValue(dwTLSIndex);
|
||||
|
||||
return pThread;
|
||||
return ppvUserData ? TlsGetValue(dwTLSIndex) : NULL;
|
||||
}
|
||||
|
||||
/************************
|
||||
|
|
|
@ -29,7 +29,7 @@
|
|||
* Known contributors to this file:
|
||||
* Sasha Mikheev
|
||||
* Steve McClure, 1998
|
||||
* Markus Armbruster, 2005-2011
|
||||
* Markus Armbruster, 2005-2012
|
||||
* Ron Koenderink, 2007-2009
|
||||
*/
|
||||
|
||||
|
@ -240,7 +240,7 @@ empth_restorectx(void)
|
|||
empth_t *
|
||||
empth_self(void)
|
||||
{
|
||||
return pthread_getspecific(ctx_key);
|
||||
return udata ? pthread_getspecific(ctx_key) : NULL;
|
||||
}
|
||||
|
||||
char *
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue