diff options
author | Corinna Vinschen <corinna@vinschen.de> | 2022-08-23 12:58:38 +0300 |
---|---|---|
committer | Corinna Vinschen <corinna@vinschen.de> | 2022-08-23 13:09:44 +0300 |
commit | 0819679a7a2101b7384b82f2449f56994359aa3a (patch) | |
tree | 7b90c1307275981e3261ac4128741f6471c591c5 /winsup/cygwin/nlsfuncs.cc | |
parent | ee54cabad9c9fcc45275551dae7bd9fc9da78f83 (diff) |
Cygwin: cwd: use SRWLOCK instead of muto
To reduce thread contention, use reader/writer locks as required.
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
Diffstat (limited to 'winsup/cygwin/nlsfuncs.cc')
-rw-r--r-- | winsup/cygwin/nlsfuncs.cc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/winsup/cygwin/nlsfuncs.cc b/winsup/cygwin/nlsfuncs.cc index 5edc0c0e6..ddd85bea1 100644 --- a/winsup/cygwin/nlsfuncs.cc +++ b/winsup/cygwin/nlsfuncs.cc @@ -1583,7 +1583,7 @@ internal_setlocale () _sys_mbstowcs (cygheap->locale.mbtowc, w_path, 32768, path); } w_cwd = tp.w_get (); - cwdstuff::cwd_lock.acquire (); + cwdstuff::acquire_write (); _sys_mbstowcs (cygheap->locale.mbtowc, w_cwd, 32768, cygheap->cwd.get_posix ()); /* Set charset for internal conversion functions. */ @@ -1592,7 +1592,7 @@ internal_setlocale () cygheap->locale.mbtowc = __utf8_mbtowc; /* Restore CWD and PATH in new charset. */ cygheap->cwd.reset_posix (w_cwd); - cwdstuff::cwd_lock.release (); + cwdstuff::release_write (); if (w_path) { char *c_path = tp.c_get (); |