kqueue.c (256281) | kqueue.c (281974) |
---|---|
1/*- 2 * Copyright (c) 2004 Robert N. M. Watson 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 --- 9 unchanged lines hidden (view full) --- 18 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 19 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 20 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 21 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 22 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 23 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 24 * SUCH DAMAGE. 25 * | 1/*- 2 * Copyright (c) 2004 Robert N. M. Watson 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 --- 9 unchanged lines hidden (view full) --- 18 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 19 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 20 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 21 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 22 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 23 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 24 * SUCH DAMAGE. 25 * |
26 * $FreeBSD: stable/10/tools/regression/sockets/kqueue/kqueue.c 137587 2004-11-11 19:47:55Z nik $ | 26 * $FreeBSD: stable/10/tools/regression/sockets/kqueue/kqueue.c 281974 2015-04-25 05:31:52Z ngie $ |
27 */ 28 29#include <sys/types.h> 30#include <sys/event.h> 31#include <sys/socket.h> 32#include <sys/time.h> 33 34#include <errno.h> --- 210 unchanged lines hidden (view full) --- 245 OK("EVFILT_WRITE, EV_DELETE"); 246} 247 248/* 249 * Basic registration exercise for kqueue(2). Create several types/brands of 250 * sockets, and confirm that we can register for various events on them. 251 */ 252int | 27 */ 28 29#include <sys/types.h> 30#include <sys/event.h> 31#include <sys/socket.h> 32#include <sys/time.h> 33 34#include <errno.h> --- 210 unchanged lines hidden (view full) --- 245 OK("EVFILT_WRITE, EV_DELETE"); 246} 247 248/* 249 * Basic registration exercise for kqueue(2). Create several types/brands of 250 * sockets, and confirm that we can register for various events on them. 251 */ 252int |
253main(int argc, char *argv[]) | 253main(void) |
254{ | 254{ |
255 int i, kq, sv[2]; | 255 int kq, sv[2]; |
256 257 printf("1..49\n"); 258 259 kq = kqueue(); 260 if (kq == -1) 261 fail(errno, "kqueue", NULL, NULL); 262 OK("kqueue()"); 263 --- 105 unchanged lines hidden --- | 256 257 printf("1..49\n"); 258 259 kq = kqueue(); 260 if (kq == -1) 261 fail(errno, "kqueue", NULL, NULL); 262 OK("kqueue()"); 263 --- 105 unchanged lines hidden --- |