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:
authorChristopher Faylor <me@cgf.cx>2006-05-25 06:33:13 +0400
committerChristopher Faylor <me@cgf.cx>2006-05-25 06:33:13 +0400
commit38229bcdcf45221857163f39d865d1d5d113a9b7 (patch)
tree4a525ef2515e8ce1715ea075e12d34a55c198390 /winsup/cygwin/cygtls.cc
parent99fc5e10f338e668b85288366e03727157f23af5 (diff)
* cygtls.cc (_cygtls::call): Call call2 using _my_tls.
(_cygtls::init_exception_handler): Always replace existing exception handler with cygwin exception handler. * cygtls.h (_cygtls::call2): Remove static designation. * dcrto.cc (dll_crt0_1): Define in a way that allows calling via _cygtls::call. (_initialize_main_tls): Delete. (_dll_crt0): Call dll_crt0_1 via cygtls::call. Set _main_tls here. * external.cc (cygwin_internal): Implement CW_CYGTLS_PADSIZE. * include/sys/cygwin.h (CW_CYGTLS_PADSIZE): Define. * tlsoffsets.h: Regenerate.
Diffstat (limited to 'winsup/cygwin/cygtls.cc')
-rw-r--r--winsup/cygwin/cygtls.cc15
1 files changed, 5 insertions, 10 deletions
diff --git a/winsup/cygwin/cygtls.cc b/winsup/cygwin/cygtls.cc
index 4f4fe06e2..d3a67565b 100644
--- a/winsup/cygwin/cygtls.cc
+++ b/winsup/cygwin/cygtls.cc
@@ -64,15 +64,15 @@ void
_cygtls::call (DWORD (*func) (void *, void *), void *arg)
{
char buf[CYGTLS_PADSIZE];
- call2 (func, arg, buf);
+ _my_tls.call2 (func, arg, buf);
}
void
_cygtls::call2 (DWORD (*func) (void *, void *), void *arg, void *buf)
{
- _my_tls.init_thread (buf, func);
+ init_thread (buf, func);
DWORD res = func (arg, buf);
- _my_tls.remove (INFINITE);
+ remove (INFINITE);
ExitThread (res);
}
@@ -248,10 +248,7 @@ _cygtls::handle_threadlist_exception (EXCEPTION_RECORD *e, exception_list *frame
return 0;
}
-/* Set up the exception handler for the current thread. The PowerPC & Mips
- use compiler generated tables to set up the exception handlers for each
- region of code, and the kernel walks the call list until it finds a region
- of code that handles exceptions. The x86 on the other hand uses segment
+/* Set up the exception handler for the current thread. The x86 uses segment
register fs, offset 0 to point to the current exception handler. */
extern exception_list *_except_list asm ("%fs:0");
@@ -260,9 +257,7 @@ void
_cygtls::init_exception_handler (exception_handler *eh)
{
el.handler = eh;
- el.prev = _except_list;
- if (!el.prev->prev && !el.prev->handler)
- el.prev = &el;
+ el.prev = &el;
_except_list = &el;
}