diff options
author | jb <jb@FreeBSD.org> | 1998-06-09 23:21:05 +0000 |
---|---|---|
committer | jb <jb@FreeBSD.org> | 1998-06-09 23:21:05 +0000 |
commit | 765df5f4d29065eac50b4bfab3407a7da8a90323 (patch) | |
tree | e14930dc53674181c346bbe0f43647669e330569 /lib/libpthread/thread/thr_select.c | |
parent | 5ed1d7e9485fa8756d1be3fdf6cfa5125ac45657 (diff) | |
download | FreeBSD-src-765df5f4d29065eac50b4bfab3407a7da8a90323.zip FreeBSD-src-765df5f4d29065eac50b4bfab3407a7da8a90323.tar.gz |
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.
Diffstat (limited to 'lib/libpthread/thread/thr_select.c')
-rw-r--r-- | lib/libpthread/thread/thr_select.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/lib/libpthread/thread/thr_select.c b/lib/libpthread/thread/thr_select.c index 96df9c1..0211883 100644 --- a/lib/libpthread/thread/thr_select.c +++ b/lib/libpthread/thread/thr_select.c @@ -73,13 +73,13 @@ select(int numfds, fd_set * readfds, fd_set * writefds, for (i = 0; i < numfds; i++) { if ((readfds && (FD_ISSET(i, readfds))) || (exceptfds && FD_ISSET(i, exceptfds))) { if (writefds && FD_ISSET(i, writefds)) { - if ((ret = _thread_fd_lock(i, FD_RDWR, NULL, __FILE__, __LINE__)) != 0) { + if ((ret = _FD_LOCK(i, FD_RDWR, NULL)) != 0) { got_all_locks = 0; break; } FD_SET(i, &rdwr_locks); } else { - if ((ret = _thread_fd_lock(i, FD_READ, NULL, __FILE__, __LINE__)) != 0) { + if ((ret = _FD_LOCK(i, FD_READ, NULL)) != 0) { got_all_locks = 0; break; } @@ -87,7 +87,7 @@ select(int numfds, fd_set * readfds, fd_set * writefds, } } else { if (writefds && FD_ISSET(i, writefds)) { - if ((ret = _thread_fd_lock(i, FD_WRITE, NULL, __FILE__, __LINE__)) != 0) { + if ((ret = _FD_LOCK(i, FD_WRITE, NULL)) != 0) { got_all_locks = 0; break; } @@ -137,13 +137,13 @@ select(int numfds, fd_set * readfds, fd_set * writefds, /* clean up the locks */ for (i = 0; i < numfds; i++) if (FD_ISSET(i, &read_locks)) - _thread_fd_unlock(i, FD_READ); + _FD_UNLOCK(i, FD_READ); for (i = 0; i < numfds; i++) if (FD_ISSET(i, &rdwr_locks)) - _thread_fd_unlock(i, FD_RDWR); + _FD_UNLOCK(i, FD_RDWR); for (i = 0; i < numfds; i++) if (FD_ISSET(i, &write_locks)) - _thread_fd_unlock(i, FD_WRITE); + _FD_UNLOCK(i, FD_WRITE); if (ret > 0) { if (readfds != NULL) { |