thr_close.c (53812) | thr_close.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_close.c 53812 1999-11-28 05:38:13Z alfred $ | 32 * $FreeBSD: head/lib/libkse/thread/thr_close.c 55838 2000-01-12 09:28:58Z jasone $ |
33 */ 34#include <errno.h> 35#include <stdlib.h> 36#include <unistd.h> 37#include <fcntl.h> 38#include <sys/stat.h> 39#ifdef _THREAD_SAFE 40#include <pthread.h> 41#include "pthread_private.h" 42 43int | 33 */ 34#include <errno.h> 35#include <stdlib.h> 36#include <unistd.h> 37#include <fcntl.h> 38#include <sys/stat.h> 39#ifdef _THREAD_SAFE 40#include <pthread.h> 41#include "pthread_private.h" 42 43int |
44close(int fd) | 44_libc_close(int fd) |
45{ 46 int flags; 47 int ret; 48 struct stat sb; 49 struct fd_table_entry *entry; 50 51 _thread_enter_cancellation_point(); 52 --- 44 unchanged lines hidden (view full) --- 97 free(entry); 98 99 /* Close the file descriptor: */ 100 ret = _thread_sys_close(fd); 101 } 102 _thread_leave_cancellation_point(); 103 return (ret); 104} | 45{ 46 int flags; 47 int ret; 48 struct stat sb; 49 struct fd_table_entry *entry; 50 51 _thread_enter_cancellation_point(); 52 --- 44 unchanged lines hidden (view full) --- 97 free(entry); 98 99 /* Close the file descriptor: */ 100 ret = _thread_sys_close(fd); 101 } 102 _thread_leave_cancellation_point(); 103 return (ret); 104} |
105 106__weak_reference(_libc_close, close); |
|
105#endif | 107#endif |