diff options
author | Christopher Faylor <me@cgf.cx> | 2010-02-28 15:54:25 +0000 |
---|---|---|
committer | Christopher Faylor <me@cgf.cx> | 2010-02-28 15:54:25 +0000 |
commit | 98a97ac6cfbbe6901e80e80caadfadacf4b931d3 (patch) | |
tree | 8409a83fb77183df732f9ff28adc9e9db7e70314 /winsup/cygwin/cygtls.h | |
parent | d5d5bf4dd5609dd29e511d688e317b2f0f1987ca (diff) | |
download | cygnal-98a97ac6cfbbe6901e80e80caadfadacf4b931d3.tar.gz cygnal-98a97ac6cfbbe6901e80e80caadfadacf4b931d3.tar.bz2 cygnal-98a97ac6cfbbe6901e80e80caadfadacf4b931d3.zip |
Update some copyrights.
* cygtls.cc (_cygtls::call): Invoke new exception protection here.
(_cygtls::init_thread): Remove conditionalized exception handler setup.
(exception_list): Delete declaration.
(_cygtls::init_exception_handler): Delete obsolete function.
* cygtls.h: Remove (now) unneeded include.
(_cygtls): Make this a real C++ class.
(_cygtls::handle_exceptions): Remove.
(_cygtls::init_exception_handler): Remove.
(_cygtls::call2): Make private.
(myfault::faulted): Remove unneeded parentheses.
* dcrt0.cc (dll_crt0_1): Remove exception handler setup.
* dlfcn.cc (dlopen): Ditto.
(dlclose): Ditto.
* dll_init.cc (dll_dllcrt0_1): Ditto.
(dll_list::detach): Use new exception handler protection.
* exceptions.cc (dump_exception): Rename to prevent confusion with new class.
(exception::handle): Rename from _cygtls::handle_exceptions. Accommodate new
exception class. Accommodate rename to dump_exception.
* tlsoffsets.h: Regenerate.
Diffstat (limited to 'winsup/cygwin/cygtls.h')
-rw-r--r-- | winsup/cygwin/cygtls.h | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/winsup/cygwin/cygtls.h b/winsup/cygwin/cygtls.h index 489e80929..408bcc27f 100644 --- a/winsup/cygwin/cygtls.h +++ b/winsup/cygwin/cygtls.h @@ -1,6 +1,6 @@ /* cygtls.h - Copyright 2003, 2004, 2005, 2008, 2009 Red Hat, Inc. + Copyright 2003, 2004, 2005, 2008, 2009, 2010 Red Hat, Inc. This software is a copyrighted work licensed under the terms of the Cygwin license. Please consult the file "CYGWIN_LICENSE" for @@ -17,7 +17,6 @@ details. */ #include <mntent.h> #undef _NOMNTENT_FUNCS #include <setjmp.h> -#include <exceptions.h> #define CYGTLS_INITIALIZED 0xc763173f @@ -173,10 +172,11 @@ extern "C" int __ljfault (jmp_buf, int); /*gentls_offsets*/ typedef __uint32_t __stack_t; -struct _cygtls + +class _cygtls { +public: void (*func) /*gentls_offsets*/(int)/*gentls_offsets*/; - exception_list el; int saved_errno; int sa_flags; sigset_t oldmask; @@ -213,7 +213,6 @@ struct _cygtls static void init (); void init_thread (void *, DWORD (*) (void *, void *)); static void call (DWORD (*) (void *, void *), void *); - void call2 (DWORD (*) (void *, void *), void *, void *) __attribute__ ((regparm (3))); static struct _cygtls *find_tls (int sig); void remove (DWORD); void push (__stack_t) __attribute__ ((regparm (2))); @@ -229,10 +228,7 @@ struct _cygtls struct sigaction& siga) __attribute__((regparm(3))); - /* exception handling */ - static int handle_exceptions (EXCEPTION_RECORD *, exception_list *, CONTEXT *, void *); bool inside_kernel (CONTEXT *); - void init_exception_handler () __attribute__ ((regparm(1))); void signal_exit (int) __attribute__ ((noreturn, regparm(2))); void copy_context (CONTEXT *) __attribute__ ((regparm(2))); void signal_debugger (int) __attribute__ ((regparm(2))); @@ -249,6 +245,8 @@ struct _cygtls void lock () __attribute__ ((regparm (1))); void unlock () __attribute__ ((regparm (1))); bool locked () __attribute__ ((regparm (1))); +private: + void call2 (DWORD (*) (void *, void *), void *, void *) __attribute__ ((regparm (3))); /*gentls_offsets*/ }; #pragma pack(pop) @@ -306,7 +304,7 @@ public: } inline int faulted (void const *obj, int myerrno = 0) __attribute__ ((always_inline)) { - return (!obj || !(*(const char **)obj)) || sebastian.setup (myerrno); + return !obj || !(*(const char **) obj) || sebastian.setup (myerrno); } inline int faulted (int myerrno) __attribute__ ((always_inline)) { |