Introduce G structure and thread-local global g.

From-SVN: r181301
This commit is contained in:
Ian Lance Taylor 2011-11-11 21:02:48 +00:00
parent 292b44341c
commit 34277c5228
14 changed files with 102 additions and 133 deletions

View file

@ -31,36 +31,6 @@ struct __go_panic_stack
_Bool __is_foreign;
};
/* The panic and defer stacks, grouped together into a single thread
local variable for convenience for systems without TLS. */
struct __go_panic_defer_struct
{
/* The list of defers to execute. */
struct __go_defer_stack *__defer;
/* The list of currently active panics. There will be more than one
if a deferred function calls panic. */
struct __go_panic_stack *__panic;
/* The current exception being thrown when unwinding after a call to
panic . This is really struct _UnwindException *. */
void *__exception;
/* Whether the current exception is from some other language. */
_Bool __is_foreign;
};
#ifdef __rtems__
#define __thread
#endif
extern __thread struct __go_panic_defer_struct *__go_panic_defer;
#ifdef __rtems__
#undef __thread
#endif
extern void __go_panic (struct __go_empty_interface)
__attribute__ ((noreturn));