Deleted Added
full compact
atexit.c (264143) atexit.c (288005)
1/*-
2 * Copyright (c) 1990, 1993
3 * The Regents of the University of California. All rights reserved.
4 *
5 * This code is derived from software contributed to Berkeley by
6 * Chris Torek.
7 *
8 * Redistribution and use in source and binary forms, with or without

--- 20 unchanged lines hidden (view full) ---

29 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
30 * SUCH DAMAGE.
31 */
32
33#if defined(LIBC_SCCS) && !defined(lint)
34static char sccsid[] = "@(#)atexit.c 8.2 (Berkeley) 7/3/94";
35#endif /* LIBC_SCCS and not lint */
36#include <sys/cdefs.h>
1/*-
2 * Copyright (c) 1990, 1993
3 * The Regents of the University of California. All rights reserved.
4 *
5 * This code is derived from software contributed to Berkeley by
6 * Chris Torek.
7 *
8 * Redistribution and use in source and binary forms, with or without

--- 20 unchanged lines hidden (view full) ---

29 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
30 * SUCH DAMAGE.
31 */
32
33#if defined(LIBC_SCCS) && !defined(lint)
34static char sccsid[] = "@(#)atexit.c 8.2 (Berkeley) 7/3/94";
35#endif /* LIBC_SCCS and not lint */
36#include <sys/cdefs.h>
37__FBSDID("$FreeBSD: head/lib/libc/stdlib/atexit.c 264143 2014-04-05 08:17:48Z theraven $");
37__FBSDID("$FreeBSD: head/lib/libc/stdlib/atexit.c 288005 2015-09-20 03:53:08Z rodrigc $");
38
39#include "namespace.h"
40#include <errno.h>
41#include <link.h>
42#include <stddef.h>
43#include <stdlib.h>
44#include <unistd.h>
45#include <pthread.h>

--- 31 unchanged lines hidden (view full) ---

77 void *fn_arg; /* argument for CXA callback */
78 void *fn_dso; /* shared module handle */
79 } fns[ATEXIT_SIZE]; /* the table itself */
80};
81
82static struct atexit *__atexit; /* points to head of LIFO stack */
83typedef DECLARE_BLOCK(void, atexit_block, void);
84
38
39#include "namespace.h"
40#include <errno.h>
41#include <link.h>
42#include <stddef.h>
43#include <stdlib.h>
44#include <unistd.h>
45#include <pthread.h>

--- 31 unchanged lines hidden (view full) ---

77 void *fn_arg; /* argument for CXA callback */
78 void *fn_dso; /* shared module handle */
79 } fns[ATEXIT_SIZE]; /* the table itself */
80};
81
82static struct atexit *__atexit; /* points to head of LIFO stack */
83typedef DECLARE_BLOCK(void, atexit_block, void);
84
85int atexit_b(atexit_block func);
86int __cxa_atexit(void (*func)(void *), void *arg, void *dso);
87
85/*
86 * Register the function described by 'fptr' to be called at application
87 * exit or owning shared object unload time. This is a helper function
88 * for atexit and __cxa_atexit.
89 */
90static int
91atexit_register(struct atexit_fn *fptr)
92{

--- 152 unchanged lines hidden ---
88/*
89 * Register the function described by 'fptr' to be called at application
90 * exit or owning shared object unload time. This is a helper function
91 * for atexit and __cxa_atexit.
92 */
93static int
94atexit_register(struct atexit_fn *fptr)
95{

--- 152 unchanged lines hidden ---