]>
Commit | Line | Data |
---|---|---|
224c7076 A |
1 | --- exit.c.orig 2006-08-08 16:13:56.000000000 -0700 |
2 | +++ exit.c 2006-08-11 22:12:56.000000000 -0700 | |
3 | @@ -44,15 +44,7 @@ | |
4 | #include "atexit.h" | |
9385eb3d | 5 | |
224c7076 A |
6 | void (*__cleanup)(); |
7 | - | |
8 | -/* | |
9385eb3d A |
9 | - * This variable is zero until a process has created a thread. |
10 | - * It is used to avoid calling locking functions in libc when they | |
11 | - * are not required. By default, libc is intended to be(come) | |
12 | - * thread-safe, but without a (significant) penalty to non-threaded | |
13 | - * processes. | |
14 | - */ | |
15 | -int __isthreaded = 0; | |
224c7076 A |
16 | +extern void __exit(int); |
17 | ||
18 | /* | |
9385eb3d | 19 | * Exit, flushing stdio buffers if necessary. |
224c7076 | 20 | @@ -61,13 +53,8 @@ |
59e0d9fe A |
21 | exit(status) |
22 | int status; | |
9385eb3d | 23 | { |
9385eb3d A |
24 | - /* Ensure that the auto-initialization routine is linked in: */ |
25 | - extern int _thread_autoinit_dummy_decl; | |
26 | - | |
27 | - _thread_autoinit_dummy_decl = 1; | |
59e0d9fe A |
28 | - |
29 | __cxa_finalize(NULL); | |
30 | if (__cleanup) | |
31 | (*__cleanup)(); | |
224c7076 A |
32 | - _exit(status); |
33 | + __exit(status); | |
34 | } |