exit.c (35125) | exit.c (35502) |
---|---|
1/*- 2 * Copyright (c) 1990, 1993 3 * The Regents of the University of California. All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 46 unchanged lines hidden (view full) --- 55 */ 56void 57exit(status) 58 int status; 59{ 60 register struct atexit *p; 61 register int n; 62 | 1/*- 2 * Copyright (c) 1990, 1993 3 * The Regents of the University of California. All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 46 unchanged lines hidden (view full) --- 55 */ 56void 57exit(status) 58 int status; 59{ 60 register struct atexit *p; 61 register int n; 62 |
63#ifdef _THREAD_SAFE 64 extern int _thread_autoinit_dummy_decl; 65 /* Ensure that the auto-initialization routine is linked in: */ 66 _thread_autoinit_dummy_decl = 1; 67#endif 68 |
|
63 for (p = __atexit; p; p = p->next) 64 for (n = p->ind; --n >= 0;) 65 (*p->fns[n])(); 66 if (__cleanup) 67 (*__cleanup)(); 68 _exit(status); 69} | 69 for (p = __atexit; p; p = p->next) 70 for (n = p->ind; --n >= 0;) 71 (*p->fns[n])(); 72 if (__cleanup) 73 (*__cleanup)(); 74 _exit(status); 75} |