diff options
author | Karl Williamson <khw@cpan.org> | 2020-11-28 19:08:21 -0700 |
---|---|---|
committer | Karl Williamson <khw@cpan.org> | 2022-09-29 13:08:27 -0600 |
commit | 6700fa0429aa6b3c06e76e4d2187944d46c59d8e (patch) | |
tree | 73e2ca4c6b693858185514f8d52da8b72d1cfb7b /os2 | |
parent | ee704dcec563f56c609a5fd1f8496cbaa8ca2015 (diff) | |
download | perl-6700fa0429aa6b3c06e76e4d2187944d46c59d8e.tar.gz |
os2: Use many reader lock instead of exclusive
This is just reading the environment, not changing it, so many readers
can be accessing it at the same time.
Diffstat (limited to 'os2')
-rw-r--r-- | os2/os2.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -5047,14 +5047,14 @@ my_tmpnam (char *str) char *p = PerlEnv_getenv("TMP"), *tpath; if (!p) p = PerlEnv_getenv("TEMP"); - ENV_LOCK; + ENV_READ_LOCK; tpath = tempnam(p, "pltmp"); if (str && tpath) { strcpy(str, tpath); - ENV_UNLOCK; + ENV_READ_UNLOCK; return str; } - ENV_UNLOCK; + ENV_READ_UNLOCK; return tpath; } |