aboutsummaryrefslogtreecommitdiff
path: root/lib/libkse/thread/thr_readv.c
diff options
context:
space:
mode:
authorJohn Birrell <jb@FreeBSD.org>1998-06-09 23:21:05 +0000
committerJohn Birrell <jb@FreeBSD.org>1998-06-09 23:21:05 +0000
commitddc8afd422568750de7698d8a92b79b27599dd2f (patch)
tree7b6d63e77297f7bad0d21a6bb68fa893b9a54574 /lib/libkse/thread/thr_readv.c
parenta67502218841058625ebd524b04693bee2622955 (diff)
downloadsrc-ddc8afd422568750de7698d8a92b79b27599dd2f.tar.gz
src-ddc8afd422568750de7698d8a92b79b27599dd2f.zip
Implement compile time debug support instead of tracking file name and
line number every time a file descriptor is locked. This looks like a big change but it isn't. It should reduce the size of libc_r and make it run slightly faster.
Notes
Notes: svn path=/head/; revision=36830
Diffstat (limited to 'lib/libkse/thread/thr_readv.c')
-rw-r--r--lib/libkse/thread/thr_readv.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/lib/libkse/thread/thr_readv.c b/lib/libkse/thread/thr_readv.c
index 10d1a43a379a..0a19290b0501 100644
--- a/lib/libkse/thread/thr_readv.c
+++ b/lib/libkse/thread/thr_readv.c
@@ -29,7 +29,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: uthread_readv.c,v 1.3 1997/04/01 22:44:16 jb Exp $
+ * $Id: uthread_readv.c,v 1.4 1998/04/29 09:59:11 jb Exp $
*
*/
#include <sys/types.h>
@@ -47,8 +47,7 @@ readv(int fd, const struct iovec * iov, int iovcnt)
int ret;
/* Lock the file descriptor for read: */
- if ((ret = _thread_fd_lock(fd, FD_READ, NULL,
- __FILE__, __LINE__)) == 0) {
+ if ((ret = _FD_LOCK(fd, FD_READ, NULL)) == 0) {
/* Perform a non-blocking readv syscall: */
while ((ret = _thread_sys_readv(fd, iov, iovcnt)) < 0) {
if ((_thread_fd_table[fd]->flags & O_NONBLOCK) == 0 &&
@@ -75,7 +74,7 @@ readv(int fd, const struct iovec * iov, int iovcnt)
break;
}
}
- _thread_fd_unlock(fd, FD_READ);
+ _FD_UNLOCK(fd, FD_READ);
}
return (ret);
}