[newlib-cygwin] Cygwin: mm/malloc_wrapper.cc: fix a comment
Corinna Vinschen
corinna@sourceware.org
Wed Aug 10 16:14:01 GMT 2022
https://sourceware.org/git/gitweb.cgi?p=newlib-cygwin.git;h=86d2126173b8374163b1de1bb723283345b128cc
commit 86d2126173b8374163b1de1bb723283345b128cc
Author: Corinna Vinschen <corinna@vinschen.de>
Date: Wed Aug 10 16:56:07 2022 +0200
Cygwin: mm/malloc_wrapper.cc: fix a comment
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
Diff:
---
winsup/cygwin/mm/malloc_wrapper.cc | 11 +++++------
1 file changed, 5 insertions(+), 6 deletions(-)
diff --git a/winsup/cygwin/mm/malloc_wrapper.cc b/winsup/cygwin/mm/malloc_wrapper.cc
index 8d12eb637..de3cf7ddc 100644
--- a/winsup/cygwin/mm/malloc_wrapper.cc
+++ b/winsup/cygwin/mm/malloc_wrapper.cc
@@ -298,12 +298,11 @@ strdup (const char *s)
return p;
}
-/* We use a critical section to lock access to the malloc data
- structures. This permits malloc to be called from different
- threads. Note that it does not make malloc reentrant, and it does
- not permit a signal handler to call malloc. The malloc code in
- newlib will call __malloc_lock and __malloc_unlock at appropriate
- times. */
+/* We use a SRW lock to lock access to the malloc data structures. This
+ permits malloc to be called from different threads. Note that it does
+ not make malloc reentrant, and it does not permit a signal handler to
+ call malloc. The malloc code in newlib will call __malloc_lock and
+ __malloc_unlock at appropriate times. */
SRWLOCK NO_COPY mallock = SRWLOCK_INIT;
More information about the Cygwin-cvs
mailing list