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>2010-02-28 18:54:25 +0300
committerChristopher Faylor <me@cgf.cx>2010-02-28 18:54:25 +0300
commit98a97ac6cfbbe6901e80e80caadfadacf4b931d3 (patch)
tree8409a83fb77183df732f9ff28adc9e9db7e70314 /winsup/cygwin/exception.h
parentd5d5bf4dd5609dd29e511d688e317b2f0f1987ca (diff)
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/exception.h')
-rw-r--r--winsup/cygwin/exception.h38
1 files changed, 38 insertions, 0 deletions
diff --git a/winsup/cygwin/exception.h b/winsup/cygwin/exception.h
new file mode 100644
index 000000000..6d0b42b69
--- /dev/null
+++ b/winsup/cygwin/exception.h
@@ -0,0 +1,38 @@
+/* exception.h
+
+ Copyright 2003, 2004, 2005, 2008, 2009 Red Hat, Inc.
+
+This software is a copyrighted work licensed under the terms of the
+Cygwin license. Please consult the file "CYGWIN_LICENSE" for
+details. */
+
+#ifndef _EXCEPTION_H
+#define _EXCEPTION_H
+
+#include <exceptions.h>
+
+extern exception_list *_except_list asm ("%fs:0");
+
+class exception
+{
+ exception_list el;
+ exception_list *save;
+ static int handle (EXCEPTION_RECORD *, exception_list *, CONTEXT *, void *);
+public:
+#ifdef DEBUG_EXCEPTION
+ exception ();
+ ~exception ();
+#else
+ exception () __attribute__ ((always_inline))
+ {
+ save = _except_list;
+ el.handler = handle;
+ el.prev = _except_list;
+ _except_list = &el;
+ };
+ ~exception () __attribute__ ((always_inline)) { _except_list = save; }
+#endif
+};
+
+#endif /*_CYGTLS_H*/ /*gentls_offsets*/
+