Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatt Joyce <matthew.joyce@embedded-brains.de>2022-02-22 13:18:38 +0300
committerCorinna Vinschen <corinna@vinschen.de>2022-02-22 14:38:46 +0300
commit44b60f0c4ba597c55dcac4f2d3119a3055c80ba1 (patch)
treee5286802e8b24fcbb7437f00163daaab0f439f2c /winsup/cygwin/cygtls.cc
parent054b00d96a81ca1169a1dd2d63d79b7ac03919ac (diff)
Make __sdidinit unused
Remove dependency on __sdidinit member of struct _reent to check object initialization. Like __sdidinit, the __cleanup member of struct _reent is initialized in the __sinit() function. Checking initialization against __cleanup serves the same purpose and will reduce overhead in the __sfp() function in a follow up patch.
Diffstat (limited to 'winsup/cygwin/cygtls.cc')
-rw-r--r--winsup/cygwin/cygtls.cc10
1 files changed, 8 insertions, 2 deletions
diff --git a/winsup/cygwin/cygtls.cc b/winsup/cygwin/cygtls.cc
index 1a2213d1f..c8352adf9 100644
--- a/winsup/cygwin/cygtls.cc
+++ b/winsup/cygwin/cygtls.cc
@@ -60,8 +60,8 @@ _cygtls::init_thread (void *x, DWORD (*func) (void *, void *))
local_clib._stdin = _GLOBAL_REENT->_stdin;
local_clib._stdout = _GLOBAL_REENT->_stdout;
local_clib._stderr = _GLOBAL_REENT->_stderr;
- local_clib.__sdidinit = _GLOBAL_REENT->__sdidinit ? -1 : 0;
- local_clib.__cleanup = _GLOBAL_REENT->__cleanup;
+ if (_GLOBAL_REENT->__cleanup)
+ local_clib.__cleanup = _cygtls::cleanup_early;
local_clib.__sglue._niobs = 3;
local_clib.__sglue._iobs = &_GLOBAL_REENT->__sf[0];
}
@@ -149,6 +149,12 @@ _cygtls::remove (DWORD wait)
}
}
+void
+_cygtls::cleanup_early (struct _reent *)
+{
+ /* Do nothing */
+}
+
#ifdef __x86_64__
void san::leave ()
{