summaryrefslogtreecommitdiffstats
path: root/lib/libc/sys
diff options
context:
space:
mode:
authorjb <jb@FreeBSD.org>1998-06-09 08:37:35 +0000
committerjb <jb@FreeBSD.org>1998-06-09 08:37:35 +0000
commit1d52ca33dca3e759fbef901483dcd6ad74431c61 (patch)
tree8caa1262c5d0840e4846d0898826273f5ad51013 /lib/libc/sys
parent2d48c5402092376dfbf65b2e19ae072943505eee (diff)
downloadFreeBSD-src-1d52ca33dca3e759fbef901483dcd6ad74431c61.zip
FreeBSD-src-1d52ca33dca3e759fbef901483dcd6ad74431c61.tar.gz
Implement compile time thread lock debug.
Diffstat (limited to 'lib/libc/sys')
-rw-r--r--lib/libc/sys/ftruncate.c4
-rw-r--r--lib/libc/sys/lseek.c4
2 files changed, 4 insertions, 4 deletions
diff --git a/lib/libc/sys/ftruncate.c b/lib/libc/sys/ftruncate.c
index 72a6a91..9d7d5fb 100644
--- a/lib/libc/sys/ftruncate.c
+++ b/lib/libc/sys/ftruncate.c
@@ -55,11 +55,11 @@ ftruncate(fd, length)
#ifdef _THREAD_SAFE
int retval;
- if (_thread_fd_lock(fd, FD_RDWR, NULL,__FILE__,__LINE__) != 0) {
+ if (_FD_LOCK(fd, FD_RDWR, NULL) != 0) {
retval = -1;
} else {
retval = __syscall((quad_t)SYS_ftruncate, fd, 0, length);
- _thread_fd_unlock(fd, FD_RDWR);
+ _FD_UNLOCK(fd, FD_RDWR);
}
return(retval);
#else
diff --git a/lib/libc/sys/lseek.c b/lib/libc/sys/lseek.c
index 8896ad8..284885f 100644
--- a/lib/libc/sys/lseek.c
+++ b/lib/libc/sys/lseek.c
@@ -55,11 +55,11 @@ lseek(fd, offset, whence)
{
#ifdef _THREAD_SAFE
off_t offs;
- if (_thread_fd_lock(fd, FD_RDWR, NULL,__FILE__,__LINE__) != 0) {
+ if (_FD_LOCK(fd, FD_RDWR, NULL) != 0) {
offs = -1;
} else {
offs = __syscall((quad_t) SYS_lseek,fd, 0, offset, whence);
- _thread_fd_unlock(fd, FD_RDWR);
+ _FD_UNLOCK(fd, FD_RDWR);
}
return(offs);
OpenPOWER on IntegriCloud