aboutsummaryrefslogtreecommitdiff
path: root/stdlib/exit.h
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>1999-12-27 21:50:29 +0000
committerUlrich Drepper <drepper@redhat.com>1999-12-27 21:50:29 +0000
commitc41041bc2f84eb8f44ff36c3d14e55944185e665 (patch)
treec545add82b7ed403c5494a121f7f56ae724601c7 /stdlib/exit.h
parent8892c471bf1078c28adb239a4866a01356651843 (diff)
downloadglibc-c41041bc2f84eb8f44ff36c3d14e55944185e665.zip
glibc-c41041bc2f84eb8f44ff36c3d14e55944185e665.tar.gz
glibc-c41041bc2f84eb8f44ff36c3d14e55944185e665.tar.bz2
Update.
1999-12-17 Andreas Jaeger <aj@suse.de> * stdlib/Versions: Export __cxa_atexit and __cxa_finalize. 1999-12-16 Mark Mitchell <mark@codesourcery.com> * stdlib/Makefile (routines): Add cxa_atexit and cxa_finalize. * stdlib/exit.h (flavor): Add ef_cxa. (exit_function): Add cxa variant. * stdlib/exit.c (exit): Handle ef_cxa exit functions. * stdlib/cxa_atexit.c: New file. * stdlib/cxa_finalize.c: New file.
Diffstat (limited to 'stdlib/exit.h')
-rw-r--r--stdlib/exit.h22
1 files changed, 20 insertions, 2 deletions
diff --git a/stdlib/exit.h b/stdlib/exit.h
index dcaa85a..9b6c1c3 100644
--- a/stdlib/exit.h
+++ b/stdlib/exit.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1996, 1997 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1996, 1997, 1999 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -19,9 +19,21 @@
#ifndef _EXIT_H
#define _EXIT_H 1
+
+enum
+{
+ ef_free, /* `ef_free' MUST be zero! */
+ ef_us,
+ ef_on,
+ ef_at,
+ ef_cxa
+};
+
struct exit_function
{
- enum { ef_free, ef_us, ef_on, ef_at } flavor; /* `ef_free' MUST be zero! */
+ /* `flavour' should be of type of the `enum' above but since we need
+ this element in an atomic operation we have to use `long int'. */
+ long int flavor;
union
{
void (*at) (void);
@@ -30,6 +42,12 @@ struct exit_function
void (*fn) (int status, void *arg);
void *arg;
} on;
+ struct
+ {
+ void (*fn) (void *arg);
+ void *arg;
+ void *dso_handle;
+ } cxa;
} func;
};
struct exit_function_list