From 619b731f5bb5e09dcf1eaf1fbd96383ca64398fd Mon Sep 17 00:00:00 2001 From: julian Date: Mon, 22 Jan 1996 00:02:33 +0000 Subject: Reviewed by: julian and (hsu?) Submitted by: John Birrel(L?) changes for threadsafe operations --- lib/libc/stdio/clrerr.c | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'lib/libc/stdio/clrerr.c') diff --git a/lib/libc/stdio/clrerr.c b/lib/libc/stdio/clrerr.c index de4526e..a597b7b 100644 --- a/lib/libc/stdio/clrerr.c +++ b/lib/libc/stdio/clrerr.c @@ -40,10 +40,20 @@ static char sccsid[] = "@(#)clrerr.c 8.1 (Berkeley) 6/4/93"; #include #undef clearerr +#ifdef _THREAD_SAFE +#include +#include "pthread_private.h" +#endif void clearerr(fp) FILE *fp; { +#ifdef _THREAD_SAFE + _thread_flockfile(fp,__FILE__,__LINE__); +#endif __sclearerr(fp); +#ifdef _THREAD_SAFE + _thread_funlockfile(fp); +#endif } -- cgit v1.1