Deleted Added
full compact
thr_select.c (50601) thr_select.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_select.c 50601 1999-08-30 00:02:08Z deischen $
32 * $FreeBSD: head/lib/libkse/thread/thr_select.c 55838 2000-01-12 09:28:58Z jasone $
33 */
34#include <unistd.h>
35#include <errno.h>
36#include <poll.h>
37#include <stdlib.h>
38#include <string.h>
39#include <sys/param.h>
40#include <sys/types.h>
41#include <sys/time.h>
42#include <sys/fcntl.h>
43#ifdef _THREAD_SAFE
44#include <pthread.h>
45#include "pthread_private.h"
46
47int
33 */
34#include <unistd.h>
35#include <errno.h>
36#include <poll.h>
37#include <stdlib.h>
38#include <string.h>
39#include <sys/param.h>
40#include <sys/types.h>
41#include <sys/time.h>
42#include <sys/fcntl.h>
43#ifdef _THREAD_SAFE
44#include <pthread.h>
45#include "pthread_private.h"
46
47int
48select(int numfds, fd_set * readfds, fd_set * writefds,
49 fd_set * exceptfds, struct timeval * timeout)
48_libc_select(int numfds, fd_set * readfds, fd_set * writefds, fd_set *
49 exceptfds, struct timeval * timeout)
50{
51 struct timespec ts;
52 int i, ret = 0, f_wait = 1;
53 int pfd_index, got_one = 0, fd_count = 0;
54 struct pthread_poll_data data;
55
56 if (numfds > _thread_dtablesize) {
57 numfds = _thread_dtablesize;

--- 140 unchanged lines hidden (view full) ---

198 if (got_one)
199 numfds++;
200 }
201 ret = numfds;
202 }
203
204 return (ret);
205}
50{
51 struct timespec ts;
52 int i, ret = 0, f_wait = 1;
53 int pfd_index, got_one = 0, fd_count = 0;
54 struct pthread_poll_data data;
55
56 if (numfds > _thread_dtablesize) {
57 numfds = _thread_dtablesize;

--- 140 unchanged lines hidden (view full) ---

198 if (got_one)
199 numfds++;
200 }
201 ret = numfds;
202 }
203
204 return (ret);
205}
206
207__weak_reference(_libc_select, select);
206#endif
208#endif