mirror of
https://sourceware.org/git/glibc.git
synced 2025-07-28 00:21:52 +03:00
* stdlib/Makefile (routines): Add quick_exit, at_quick_exit, and
cxa_at_quick_exit. (static-only-routines): Add at_quick_exit. * stdlib/Versions: Export quick_exit and __cxa_at_quick_exit for GLIBC_2.10. * stdlib/quick_exit.c: New file. * stdlib/at_quick_exit.c: New file. * stdlib/cxa_at_quick_exit.c: New file. * stdlib/cxa_atexit.c (__cxa_atexit): Move body to new function. Call it appropriately. (__internal_atexit): New function. (__new_exitfn): Now takes parameter to point to the list to use. * stdlib/cxa_finalize.c: Remove quick_exit handlers, don't call them. * stdlib/exit.c (__run_exit_handlers): New function. Split from... (exit): ...here. Just call __run_exit_handlers appropriately. * stdlib/exit.h: Declare __quick_exit_funcs, __run_exit_handlers, __internal_atexit, __cxa_at_quick_exit. Adjust __new_exitfn. * stdlib/on_exit.c: Adjust call to __new_exitfn. * stdlib/stdlib.h: Declare at_quick_exit and quick_exit.
This commit is contained in:
@ -1,4 +1,4 @@
|
||||
/* Copyright (C) 1991,1996,1997,1999,2001,2002,2006
|
||||
/* Copyright (C) 1991,1996,1997,1999,2001,2002,2006,2009
|
||||
Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
|
||||
@ -20,6 +20,7 @@
|
||||
#ifndef _EXIT_H
|
||||
#define _EXIT_H 1
|
||||
|
||||
#include <stdbool.h>
|
||||
#include <stdint.h>
|
||||
|
||||
enum
|
||||
@ -59,8 +60,19 @@ struct exit_function_list
|
||||
struct exit_function fns[32];
|
||||
};
|
||||
extern struct exit_function_list *__exit_funcs attribute_hidden;
|
||||
extern struct exit_function_list *__quick_exit_funcs attribute_hidden;
|
||||
|
||||
extern struct exit_function *__new_exitfn (void);
|
||||
extern struct exit_function *__new_exitfn (struct exit_function_list **listp);
|
||||
extern uint64_t __new_exitfn_called attribute_hidden;
|
||||
|
||||
extern void __run_exit_handlers (int status, struct exit_function_list **listp,
|
||||
bool run_list_atexit) attribute_hidden;
|
||||
|
||||
extern int __internal_atexit (void (*func) (void *), void *arg, void *d,
|
||||
struct exit_function_list **listp)
|
||||
attribute_hidden;
|
||||
extern int __cxa_at_quick_exit (void (*func) (void *), void *d)
|
||||
attribute_hidden;
|
||||
|
||||
|
||||
#endif /* exit.h */
|
||||
|
Reference in New Issue
Block a user