Mercurial > illumos > illumos-gate
comparison usr/src/lib/libc/port/unwind/unwind.c @ 13726:056b82d21d71
1450 Illumos should be buildable with GCC4
Reviewed by: Joshua M. Clulow <josh@sysmgr.org>
Reviewed by: Keith Wesolowski <keith.wesolowski@joyent.com>
Reviewed by: Gordon Ross <gwr@nexenta.com>
Reviewed by: Albert Lee <trisk@nexenta.com>
Approved by: Gordon Ross <gwr@nexenta.com>
author | Richard Lowe <richlowe@richlowe.net> |
---|---|
date | Sat, 14 Apr 2012 20:29:22 -0400 |
parents | febeba71273d |
children |
comparison
equal
deleted
inserted
replaced
13725:9a3ca91fb74e | 13726:056b82d21d71 |
---|---|
22 /* | 22 /* |
23 * Copyright 2008 Sun Microsystems, Inc. All rights reserved. | 23 * Copyright 2008 Sun Microsystems, Inc. All rights reserved. |
24 * Use is subject to license terms. | 24 * Use is subject to license terms. |
25 */ | 25 */ |
26 | 26 |
27 #pragma ident "%Z%%M% %I% %E% SMI" | |
28 | |
29 #include "lint.h" | 27 #include "lint.h" |
30 #include "thr_uberdata.h" | 28 #include "thr_uberdata.h" |
31 #include <dlfcn.h> | 29 #include <dlfcn.h> |
32 | 30 |
33 /* | 31 /* |
38 | 36 |
39 /* | 37 /* |
40 * _ex_unwind() is provided by libC, but if libC is not loaded we | 38 * _ex_unwind() is provided by libC, but if libC is not loaded we |
41 * need to call a local version of _ex_unwind() which does exactly | 39 * need to call a local version of _ex_unwind() which does exactly |
42 * the same thing except for calling C++ destructors. | 40 * the same thing except for calling C++ destructors. |
41 * | |
42 * Note that neither of these literally "returns twice" as, for eg, setjmp | |
43 * does, but they induce unusual control flow which the compiler should treat | |
44 * in the same manner (make all registers dead, etc.). | |
43 */ | 45 */ |
44 extern void _ex_clnup_handler(void *, void (*)(void *)); | 46 extern void _ex_clnup_handler(void *, void (*)(void *)) __RETURNS_TWICE; |
45 extern void _ex_unwind_local(void); | 47 extern void _ex_unwind_local(void) __RETURNS_TWICE; |
46 #pragma unknown_control_flow(_ex_clnup_handler) | 48 #pragma unknown_control_flow(_ex_clnup_handler) |
47 #pragma unknown_control_flow(_ex_unwind_local) | 49 #pragma unknown_control_flow(_ex_unwind_local) |
48 | 50 |
49 /* | 51 /* |
50 * _t_cancel(fp):calls cleanup handlers if there are any in | 52 * _t_cancel(fp):calls cleanup handlers if there are any in |