summaryrefslogtreecommitdiffstats
path: root/lib/libc/stdio/scanf.c
diff options
context:
space:
mode:
authorkib <kib@FreeBSD.org>2017-07-13 09:27:11 +0000
committerkib <kib@FreeBSD.org>2017-07-13 09:27:11 +0000
commit668d59a23068fc4a8aa806b914d95c71e903e92f (patch)
tree2479fb648c9c841acba46263712cd58a9c7dc384 /lib/libc/stdio/scanf.c
parent55a89eef51d5a91be65f136631688b2c5b3371ab (diff)
downloadFreeBSD-src-668d59a23068fc4a8aa806b914d95c71e903e92f.zip
FreeBSD-src-668d59a23068fc4a8aa806b914d95c71e903e92f.tar.gz
MFC r320472,r320508,r320509:
Make stdio deferred cancel-safe.
Diffstat (limited to 'lib/libc/stdio/scanf.c')
-rw-r--r--lib/libc/stdio/scanf.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/libc/stdio/scanf.c b/lib/libc/stdio/scanf.c
index e377724..55aa420 100644
--- a/lib/libc/stdio/scanf.c
+++ b/lib/libc/stdio/scanf.c
@@ -56,9 +56,9 @@ scanf(char const * __restrict fmt, ...)
va_list ap;
va_start(ap, fmt);
- FLOCKFILE(stdin);
+ FLOCKFILE_CANCELSAFE(stdin);
ret = __svfscanf(stdin, __get_locale(), fmt, ap);
- FUNLOCKFILE(stdin);
+ FUNLOCKFILE_CANCELSAFE();
va_end(ap);
return (ret);
}
@@ -70,9 +70,9 @@ scanf_l(locale_t locale, char const * __restrict fmt, ...)
FIX_LOCALE(locale);
va_start(ap, fmt);
- FLOCKFILE(stdin);
+ FLOCKFILE_CANCELSAFE(stdin);
ret = __svfscanf(stdin, locale, fmt, ap);
- FUNLOCKFILE(stdin);
+ FUNLOCKFILE_CANCELSAFE();
va_end(ap);
return (ret);
}
OpenPOWER on IntegriCloud