summaryrefslogtreecommitdiffstats
path: root/newlib/libc/stdlib/__call_atexit.c
diff options
context:
space:
mode:
Diffstat (limited to 'newlib/libc/stdlib/__call_atexit.c')
-rw-r--r--newlib/libc/stdlib/__call_atexit.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/newlib/libc/stdlib/__call_atexit.c b/newlib/libc/stdlib/__call_atexit.c
index 5365f32e9..813c34da6 100644
--- a/newlib/libc/stdlib/__call_atexit.c
+++ b/newlib/libc/stdlib/__call_atexit.c
@@ -33,7 +33,7 @@ _DEFUN (__call_exitprocs, (code, d),
#ifndef __SINGLE_THREAD__
- __lock_acquire(__atexit_lock);
+ __lock_acquire_recursive(__atexit_lock);
#endif
restart:
@@ -115,7 +115,7 @@ _DEFUN (__call_exitprocs, (code, d),
#endif
}
#ifndef __SINGLE_THREAD__
- __lock_release(__atexit_lock);
+ __lock_release_recursive(__atexit_lock);
#endif
}