thr_write.c (54708) | thr_write.c (55838) |
---|---|
1/* 2 * Copyright (c) 1995-1998 John Birrell <jb@cimlogic.com.au> 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 15 unchanged lines hidden (view full) --- 24 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 25 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 26 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 27 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 28 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 29 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 30 * SUCH DAMAGE. 31 * | 1/* 2 * Copyright (c) 1995-1998 John Birrell <jb@cimlogic.com.au> 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 15 unchanged lines hidden (view full) --- 24 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 25 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 26 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 27 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 28 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 29 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 30 * SUCH DAMAGE. 31 * |
32 * $FreeBSD: head/lib/libkse/thread/thr_write.c 54708 1999-12-17 00:57:54Z deischen $ | 32 * $FreeBSD: head/lib/libkse/thread/thr_write.c 55838 2000-01-12 09:28:58Z jasone $ |
33 * 34 */ 35#include <sys/types.h> 36#include <sys/fcntl.h> 37#include <sys/uio.h> 38#include <errno.h> 39#include <unistd.h> 40#ifdef _THREAD_SAFE 41#include <pthread.h> 42#include "pthread_private.h" 43 44ssize_t | 33 * 34 */ 35#include <sys/types.h> 36#include <sys/fcntl.h> 37#include <sys/uio.h> 38#include <errno.h> 39#include <unistd.h> 40#ifdef _THREAD_SAFE 41#include <pthread.h> 42#include "pthread_private.h" 43 44ssize_t |
45write(int fd, const void *buf, size_t nbytes) | 45_libc_write(int fd, const void *buf, size_t nbytes) |
46{ 47 int blocking; 48 int type; 49 ssize_t n; 50 ssize_t num = 0; 51 ssize_t ret; 52 53 _thread_enter_cancellation_point(); --- 77 unchanged lines hidden (view full) --- 131 /* Return the number of bytes written: */ 132 ret = num; 133 } 134 _FD_UNLOCK(fd, FD_RDWR); 135 } 136 _thread_leave_cancellation_point(); 137 return (ret); 138} | 46{ 47 int blocking; 48 int type; 49 ssize_t n; 50 ssize_t num = 0; 51 ssize_t ret; 52 53 _thread_enter_cancellation_point(); --- 77 unchanged lines hidden (view full) --- 131 /* Return the number of bytes written: */ 132 ret = num; 133 } 134 _FD_UNLOCK(fd, FD_RDWR); 135 } 136 _thread_leave_cancellation_point(); 137 return (ret); 138} |
139 140__weak_reference(_libc_write, write); |
|
139#endif | 141#endif |