From owner-cvs-lib Sat Apr 11 00:41:16 1998 Return-Path: Received: (from daemon@localhost) by hub.freebsd.org (8.8.8/8.8.8) id AAA00771 for cvs-lib-outgoing; Sat, 11 Apr 1998 00:41:16 -0700 (PDT) (envelope-from owner-cvs-lib) Received: from freefall.freebsd.org (freefall.FreeBSD.ORG [204.216.27.21]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id AAA00634; Sat, 11 Apr 1998 00:41:03 -0700 (PDT) (envelope-from jb@FreeBSD.org) From: John Birrell Received: (from jb@localhost) by freefall.freebsd.org (8.8.8/8.8.5) id AAA00617; Sat, 11 Apr 1998 00:40:50 -0700 (PDT) Date: Sat, 11 Apr 1998 00:40:50 -0700 (PDT) Message-Id: <199804110740.AAA00617@freefall.freebsd.org> To: cvs-committers@FreeBSD.ORG, cvs-all@FreeBSD.ORG, cvs-lib@FreeBSD.ORG Subject: cvs commit: src/lib/libc/stdio _flock_stub.c Makefile.inc clrerr.c fclose.c fflush.c fgetc.c fgetpos.c fgets.c fpurge.c fputc.c fputs.c fread.c fscanf.c fseek.c ftell.c fwrite.c getc.c getchar.c putc.c putchar.c puts.c putw.c rewind.c scanf.c setvbuf.c ungetc.c ... Sender: owner-cvs-lib@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk jb 1998/04/11 00:40:50 PDT Modified files: lib/libc/stdio Makefile.inc clrerr.c fclose.c fflush.c fgetc.c fgetpos.c fgets.c fpurge.c fputc.c fputs.c fread.c fscanf.c fseek.c ftell.c fwrite.c getc.c getchar.c putc.c putchar.c puts.c putw.c rewind.c scanf.c setvbuf.c ungetc.c vfprintf.c vscanf.c Added files: lib/libc/stdio _flock_stub.c Log: Add FILE locking stubs for libc. Change the FILE locking to support kernel threads when linked with libpthread (which you haven't see yet). This requires that libc become thread-safe and thread-aware, testing __isthreaded before attempting to do lock/unlock calls. The impact on non-threaded programs is minor. This change works with libc_r, so it's the best compromise. Revision Changes Path 1.14 +11 -3 src/lib/libc/stdio/Makefile.inc 1.6 +4 -11 src/lib/libc/stdio/clrerr.c 1.6 +4 -11 src/lib/libc/stdio/fclose.c 1.6 +4 -11 src/lib/libc/stdio/fflush.c 1.6 +4 -11 src/lib/libc/stdio/fgetc.c 1.6 +4 -11 src/lib/libc/stdio/fgetpos.c 1.8 +6 -17 src/lib/libc/stdio/fgets.c 1.6 +4 -11 src/lib/libc/stdio/fpurge.c 1.6 +4 -11 src/lib/libc/stdio/fputc.c 1.6 +4 -11 src/lib/libc/stdio/fputs.c 1.6 +5 -11 src/lib/libc/stdio/fread.c 1.6 +4 -11 src/lib/libc/stdio/fscanf.c 1.7 +10 -26 src/lib/libc/stdio/fseek.c 1.9 +5 -14 src/lib/libc/stdio/ftell.c 1.6 +4 -11 src/lib/libc/stdio/fwrite.c 1.6 +4 -11 src/lib/libc/stdio/getc.c 1.6 +4 -11 src/lib/libc/stdio/getchar.c 1.6 +4 -11 src/lib/libc/stdio/putc.c 1.6 +4 -11 src/lib/libc/stdio/putchar.c 1.6 +4 -11 src/lib/libc/stdio/puts.c 1.6 +4 -11 src/lib/libc/stdio/putw.c 1.6 +4 -11 src/lib/libc/stdio/rewind.c 1.6 +4 -11 src/lib/libc/stdio/scanf.c 1.6 +5 -14 src/lib/libc/stdio/setvbuf.c 1.6 +9 -26 src/lib/libc/stdio/ungetc.c 1.18 +6 -17 src/lib/libc/stdio/vfprintf.c 1.6 +4 -11 src/lib/libc/stdio/vscanf.c