Subversion Repositories Kolibri OS

Rev

Rev 4874 | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 4874 Rev 4921
Line 9... Line 9...
9
#include "atexit.h"
9
#include "atexit.h"
Line 10... Line 10...
10
 
10
 
11
/* Make this a weak reference to avoid pulling in free.  */
11
/* Make this a weak reference to avoid pulling in free.  */
Line -... Line 12...
-
 
12
void free(void *) _ATTRIBUTE((__weak__));
-
 
13
 
12
void free(void *) _ATTRIBUTE((__weak__));
14
__LOCK_INIT_RECURSIVE(, __atexit_lock);
13
 
15
 
14
#ifndef __SINGLE_THREAD__
16
#ifdef _REENT_GLOBAL_ATEXIT
Line 15... Line 17...
15
extern _LOCK_RECURSIVE_T __atexit_lock;
17
struct _atexit *_global_atexit = _NULL;
Line 16... Line 18...
16
#endif
18
#endif
Line 76... Line 78...
76
  __lock_acquire_recursive(__atexit_lock);
78
  __lock_acquire_recursive(__atexit_lock);
77
#endif
79
#endif
Line 78... Line 80...
78
 
80
 
Line 79... Line 81...
79
 restart:
81
 restart:
80
 
82
 
81
  p = _GLOBAL_REENT->_atexit;
83
  p = _GLOBAL_ATEXIT;
82
  lastp = &_GLOBAL_REENT->_atexit;
84
  lastp = &_GLOBAL_ATEXIT;
83
  while (p)
85
  while (p)
84
    {
86
    {
85
#ifdef _REENT_SMALL
87
#ifdef _REENT_SMALL