From owner-cvs-all Sun Feb 11 14: 7: 1 2001 Delivered-To: cvs-all@freebsd.org Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by hub.freebsd.org (Postfix) with ESMTP id EA5E437B491; Sun, 11 Feb 2001 14:06:46 -0800 (PST) Received: (from deischen@localhost) by freefall.freebsd.org (8.11.1/8.11.1) id f1BM6kn53702; Sun, 11 Feb 2001 14:06:46 -0800 (PST) (envelope-from deischen) Message-Id: <200102112206.f1BM6kn53702@freefall.freebsd.org> From: Daniel Eischen Date: Sun, 11 Feb 2001 14:06:46 -0800 (PST) To: cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org Subject: cvs commit: src/include stdio.h src/lib/libc/gen _pthread_stubs.c src/lib/libc/include namespace.h un-namespace.h src/lib/libc/stdio _flock_stub.c asprintf.c fclose.c feof.c ferror.c fflush.c fgetc.c fgetln.c fgetpos.c fileno.c findfp.c fopen.c freopen.c fwalk.c ... X-FreeBSD-CVS-Branch: HEAD Sender: owner-cvs-all@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG deischen 2001/02/11 14:06:46 PST Modified files: include stdio.h Log: libc MT-safety, part 2. Add a lock to FILE and define an additional flag. Revision Changes Path 1.26 +5 -1 src/include/stdio.h Modified files: lib/libc/gen _pthread_stubs.c lib/libc/include namespace.h un-namespace.h lib/libc/stdio _flock_stub.c asprintf.c fclose.c feof.c ferror.c fflush.c fgetc.c fgetln.c fgetpos.c fileno.c findfp.c fopen.c freopen.c fwalk.c getc.c refill.c rget.c snprintf.c sprintf.c Log: libc MT-safety, part 2. Add a lock to FILE. flockfile and friends are now implemented (for the most part) in libc. flockfile_debug is implemented in libc_r; I suppose it's about time to kill it but will do it in a future commit. Fix a potential deadlock in _fwalk in a threaded environment. A file flag (__SIGN) was added to stdio.h that, when set, tells _fwalk to ignore it in its walk. This seemed to be needed in refill.c because each file needs to be locked when flushing. Add a stub for pthread_self in libc. This is needed by flockfile which is allowed by POSIX to be recursive. Make fgetpos() error return value (-1) match man page. Remove recursive calls to locked functions (stdio); I think I've got them all, but I may have missed a couple. A few K&R -> ANSI conversions along with removal of a few instances of "register". $Id$ -> $FreeBSD$ in libc/stdio/rget.c Not objected to: -arch, a few months ago Revision Changes Path 1.2 +13 -1 src/lib/libc/gen/_pthread_stubs.c 1.2 +2 -2 src/lib/libc/include/namespace.h 1.2 +2 -2 src/lib/libc/include/un-namespace.h 1.5 +129 -23 src/lib/libc/stdio/_flock_stub.c 1.7 +4 -2 src/lib/libc/stdio/asprintf.c 1.10 +3 -10 src/lib/libc/stdio/fclose.c 1.7 +15 -7 src/lib/libc/stdio/feof.c 1.7 +15 -7 src/lib/libc/stdio/ferror.c 1.9 +16 -3 src/lib/libc/stdio/fflush.c 1.9 +2 -1 src/lib/libc/stdio/fgetc.c 1.7 +18 -14 src/lib/libc/stdio/fgetln.c 1.10 +9 -12 src/lib/libc/stdio/fgetpos.c 1.7 +7 -6 src/lib/libc/stdio/fileno.c 1.10 +4 -4 src/lib/libc/stdio/findfp.c 1.5 +1 -2 src/lib/libc/stdio/fopen.c 1.7 +3 -3 src/lib/libc/stdio/freopen.c 1.8 +5 -2 src/lib/libc/stdio/fwalk.c 1.9 +3 -4 src/lib/libc/stdio/getc.c 1.10 +22 -10 src/lib/libc/stdio/refill.c 1.3 +3 -6 src/lib/libc/stdio/rget.c 1.13 +4 -2 src/lib/libc/stdio/snprintf.c 1.7 +2 -2 src/lib/libc/stdio/sprintf.c To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message