summaryrefslogtreecommitdiffstats
path: root/lib/libpthread/thread/thr_write.c
diff options
context:
space:
mode:
authorjulian <julian@FreeBSD.org>1998-02-13 01:27:34 +0000
committerjulian <julian@FreeBSD.org>1998-02-13 01:27:34 +0000
commitb31dde27bfeaed94b1026c0788c4e98b1af47f3c (patch)
treefc79071c0e7ec3b06afa547a18a7327d4c544935 /lib/libpthread/thread/thr_write.c
parentb28763a6b13c1f0830c84238266c8ad69f7455bd (diff)
downloadFreeBSD-src-b31dde27bfeaed94b1026c0788c4e98b1af47f3c.zip
FreeBSD-src-b31dde27bfeaed94b1026c0788c4e98b1af47f3c.tar.gz
Fixes from Jeremy Allison and Terry Lambert for pthreads:
specifically: uthread_accept.c: Fix for inherited socket not getting correct entry in pthread flags. uthread_create.c: Fix to allow pthread_t pointer return to be null if caller doesn't care about return. uthread_fd.c: Fix for return codes to be placed into correct errno. uthread_init.c: Changes to make gcc-2.8 thread aware for exception stack frames (WARNING: This is #ifdef'ed out by default and is different from the Cygnus egcs fix). uthread_ioctl.c: Fix for blocking/non-blocking ioctl. uthread_kern.c: Signal handling fixes (only one case left to fix, that of an externally sent SIGSEGV and friends - a fairly unusual case). uthread_write.c: Fix for lock of fd - ask for write lock, not read/write. uthread_writev.c: Fix for lock of fd - ask for write lock, not read/write. Pthreads now works well enough to run the LDAP and ACAPD(with the gcc 2.8 fix) sample implementations.
Diffstat (limited to 'lib/libpthread/thread/thr_write.c')
-rw-r--r--lib/libpthread/thread/thr_write.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/libpthread/thread/thr_write.c b/lib/libpthread/thread/thr_write.c
index eab105d..e86e71b 100644
--- a/lib/libpthread/thread/thr_write.c
+++ b/lib/libpthread/thread/thr_write.c
@@ -29,7 +29,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id$
+ * $Id: uthread_write.c,v 1.3 1997/04/01 22:44:17 jb Exp $
*
*/
#include <sys/types.h>
@@ -47,8 +47,8 @@ write(int fd, const void *buf, size_t nbytes)
int ret;
int status;
- /* Lock the file descriptor for read and write: */
- if ((ret = _thread_fd_lock(fd, FD_RDWR, NULL,
+ /* Lock the file descriptor for write: */
+ if ((ret = _thread_fd_lock(fd, FD_WRITE, NULL,
__FILE__, __LINE__)) == 0) {
/* Perform a non-blocking write syscall: */
while ((ret = _thread_sys_write(fd, buf, nbytes)) < 0) {
OpenPOWER on IntegriCloud