diff options
author | Manuel Novoa III <mjn3@codepoet.org> | 2004-02-11 23:48:50 +0000 |
---|---|---|
committer | Manuel Novoa III <mjn3@codepoet.org> | 2004-02-11 23:48:50 +0000 |
commit | 082e680bd54e999f2bb4eb77141958938b1e9ee9 (patch) | |
tree | 203c45b85ca608e1550d8ffc459456fc9cf0b30b /libpthread/linuxthreads/lockfile.c | |
parent | 17c21765b4a97c6f0b74ba8466073e5a3f97cdee (diff) |
New stdio core. Should be more maintainable. Fixes a couple of bugs.
Codepaths streamlined. Improved performance for nonthreaded apps
when linked with a thread-enabled libc.
Minor iconv bug and some locale/thread related startup issues fixed.
These showed up in getting a gcj-compiled java helloworld app running.
Removed some old extension functions... _stdio_fdout and _stdio_fsfopen.
Diffstat (limited to 'libpthread/linuxthreads/lockfile.c')
-rw-r--r-- | libpthread/linuxthreads/lockfile.c | 29 |
1 files changed, 4 insertions, 25 deletions
diff --git a/libpthread/linuxthreads/lockfile.c b/libpthread/linuxthreads/lockfile.c index 051bb75bc..d54377fc0 100644 --- a/libpthread/linuxthreads/lockfile.c +++ b/libpthread/linuxthreads/lockfile.c @@ -20,29 +20,8 @@ #include <stdio.h> #include <pthread.h> -void -__flockfile (FILE *stream) -{ - pthread_mutex_lock(&stream->lock); -} -weak_alias (__flockfile, flockfile); - - -void -__funlockfile (FILE *stream) -{ - pthread_mutex_unlock(&stream->lock); -} -weak_alias (__funlockfile, funlockfile); - - -int -__ftrylockfile (FILE *stream) -{ - return pthread_mutex_trylock(&stream->lock); -} -weak_alias (__ftrylockfile, ftrylockfile); - +/* Note: glibc puts flockfile, funlockfile, and ftrylockfile in both + * libc and libpthread. In uClibc, they are now in libc only. */ void __fresetlockfiles (void) @@ -53,8 +32,8 @@ __fresetlockfiles (void) pthread_mutexattr_init(&attr); pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_RECURSIVE_NP); - for (fp = _stdio_openlist; fp != NULL; fp = fp->nextopen) - pthread_mutex_init(&fp->lock, &attr); + for (fp = _stdio_openlist; fp != NULL; fp = fp->__nextopen) + pthread_mutex_init(&fp->__lock, &attr); pthread_mutexattr_destroy(&attr); } |