1 /* go-defer.h -- the defer stack.
3 Copyright 2010 The Go Authors. All rights reserved.
4 Use of this source code is governed by a BSD-style
5 license that can be found in the LICENSE file. */
7 struct __go_panic_stack;
9 /* The defer stack is a list of these structures. */
11 struct __go_defer_stack
13 /* The next entry in the stack. */
14 struct __go_defer_stack *__next;
16 /* The frame pointer for the function which called this defer
20 /* The value of the panic stack when this function is deferred.
21 This function can not recover this value from the panic stack.
22 This can happen if a deferred function uses its own defer
24 struct __go_panic_stack *__panic;
26 /* The function to call. */
27 void (*__pfn) (void *);
29 /* The argument to pass to the function. */
32 /* The return address that a recover thunk matches against. This is
33 set by __go_set_defer_retaddr which is called by the thunks
34 created by defer statements. */
35 const void *__retaddr;