diff options
author | Daniel Eischen <deischen@FreeBSD.org> | 2001-02-11 22:06:43 +0000 |
---|---|---|
committer | Daniel Eischen <deischen@FreeBSD.org> | 2001-02-11 22:06:43 +0000 |
commit | 29ac6bd228d1c75dc4c19105fa149861bff04720 (patch) | |
tree | 91800b480f9efe4c0d90fe0b653e4bb1125f24f7 /lib/libc/include | |
parent | 5b62961a494b0271f6029f0c8f1e8c92a2267fe7 (diff) | |
download | src-29ac6bd228d1c75dc4c19105fa149861bff04720.tar.gz src-29ac6bd228d1c75dc4c19105fa149861bff04720.zip |
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
Notes
Notes:
svn path=/head/; revision=72373
Diffstat (limited to 'lib/libc/include')
-rw-r--r-- | lib/libc/include/namespace.h | 2 | ||||
-rw-r--r-- | lib/libc/include/un-namespace.h | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/lib/libc/include/namespace.h b/lib/libc/include/namespace.h index 95acce4019a0..ddffa82e4025 100644 --- a/lib/libc/include/namespace.h +++ b/lib/libc/include/namespace.h @@ -70,6 +70,7 @@ #define pthread_mutexattr_destroy _pthread_mutexattr_destroy #define pthread_mutexattr_settype _pthread_mutexattr_settype #define pthread_once _pthread_once +#define pthread_self _pthread_self #define pthread_setspecific _pthread_setspecific #define read _read #define readv _readv @@ -115,7 +116,6 @@ #define pthread_rwlock_wrlock _pthread_rwlock_wrlock #define pthread_rwlockattr_init _pthread_rwlockattr_init #define pthread_rwlockattr_destroy _pthread_rwlockattr_destroy -#define pthread_self _pthread_self #define sched_yield _sched_yield #define sendfile _sendfile #define shutdown _shutdown diff --git a/lib/libc/include/un-namespace.h b/lib/libc/include/un-namespace.h index 4d2e8bd8807a..76ba6256f31a 100644 --- a/lib/libc/include/un-namespace.h +++ b/lib/libc/include/un-namespace.h @@ -65,6 +65,7 @@ #undef pthread_mutexattr_destroy #undef pthread_mutexattr_settype #undef pthread_once +#undef pthread_self #undef pthread_setspecific #undef read #undef readv @@ -102,7 +103,6 @@ #undef pthread_rwlock_wrlock #undef pthread_rwlockattr_init #undef pthread_rwlockattr_destroy -#undef pthread_self #undef sched_yield #undef sendfile #undef shutdown |