From 7a42c833db7e18550c9fcb83b0e7b036ec415502 Mon Sep 17 00:00:00 2001 From: dsl Date: Wed, 9 Dec 2009 21:32:58 +0000 Subject: [PATCH] Rename fo_drain() to fo_abort(), 'drain' is used to mean 'wait for output do drain' in many places, whereas fo_drain() was called in order to force blocking read()/write() etc calls to return to userspace so that a close() call from a different thread can complete. In the sockets code comment out the broken code in the inner function, it was being called from compat code. --- sys/arch/xen/xen/xenevt.c | 6 +++--- sys/compat/svr4/svr4_net.c | 6 +++--- sys/compat/svr4_32/svr4_32_net.c | 6 +++--- sys/dev/dmover/dmover_io.c | 6 +++--- sys/dev/putter/putter.c | 6 +++--- sys/kern/kern_descrip.c | 8 ++++---- sys/kern/kern_drvctl.c | 6 +++--- sys/kern/kern_event.c | 6 +++--- sys/kern/sys_mqueue.c | 6 +++--- sys/kern/sys_pipe.c | 6 +++--- sys/kern/sys_socket.c | 10 +++++----- sys/kern/uipc_socket.c | 18 ++++++++---------- sys/kern/uipc_syscalls.c | 6 +++--- sys/kern/vfs_vnops.c | 6 +++--- sys/net/bpf.c | 6 +++--- sys/net/if_tap.c | 6 +++--- sys/opencrypto/cryptodev.c | 6 +++--- sys/sys/file.h | 6 +++--- sys/sys/socketvar.h | 8 ++++---- 19 files changed, 66 insertions(+), 68 deletions(-) diff --git a/sys/arch/xen/xen/xenevt.c b/sys/arch/xen/xen/xenevt.c index 6e06b95cebf8..bbec52923426 100644 --- a/sys/arch/xen/xen/xenevt.c +++ b/sys/arch/xen/xen/xenevt.c @@ -1,4 +1,4 @@ -/* $NetBSD: xenevt.c,v 1.34 2009/10/19 18:41:11 bouyer Exp $ */ +/* $NetBSD: xenevt.c,v 1.35 2009/12/09 21:32:58 dsl Exp $ */ /* * Copyright (c) 2005 Manuel Bouyer. @@ -26,7 +26,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: xenevt.c,v 1.34 2009/10/19 18:41:11 bouyer Exp $"); +__KERNEL_RCSID(0, "$NetBSD: xenevt.c,v 1.35 2009/12/09 21:32:58 dsl Exp $"); #include "opt_xen.h" #include @@ -81,7 +81,7 @@ static const struct fileops xenevt_fileops = { .fo_stat = fbadop_stat, .fo_close = xenevt_fclose, .fo_kqfilter = /* xenevt_fkqfilter */ fnullop_kqfilter, - .fo_drain = fnullop_drain, + .fo_abort = fnullop_abort, }; dev_type_open(xenevtopen); diff --git a/sys/compat/svr4/svr4_net.c b/sys/compat/svr4/svr4_net.c index b254349568e1..e16398f90fc6 100644 --- a/sys/compat/svr4/svr4_net.c +++ b/sys/compat/svr4/svr4_net.c @@ -1,4 +1,4 @@ -/* $NetBSD: svr4_net.c,v 1.56 2009/04/04 10:12:51 ad Exp $ */ +/* $NetBSD: svr4_net.c,v 1.57 2009/12/09 21:32:58 dsl Exp $ */ /*- * Copyright (c) 1994, 2008, 2009 The NetBSD Foundation, Inc. @@ -34,7 +34,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: svr4_net.c,v 1.56 2009/04/04 10:12:51 ad Exp $"); +__KERNEL_RCSID(0, "$NetBSD: svr4_net.c,v 1.57 2009/12/09 21:32:58 dsl Exp $"); #define COMPAT_SVR4 1 @@ -108,7 +108,7 @@ static const struct fileops svr4_netops = { .fo_stat = soo_stat, .fo_close = svr4_soo_close, .fo_kqfilter = soo_kqfilter, - .fo_drain = soo_drain, + .fo_abort = soo_abort, }; diff --git a/sys/compat/svr4_32/svr4_32_net.c b/sys/compat/svr4_32/svr4_32_net.c index 74e8d3642d5f..e87720564413 100644 --- a/sys/compat/svr4_32/svr4_32_net.c +++ b/sys/compat/svr4_32/svr4_32_net.c @@ -1,4 +1,4 @@ -/* $NetBSD: svr4_32_net.c,v 1.19 2009/04/04 10:12:51 ad Exp $ */ +/* $NetBSD: svr4_32_net.c,v 1.20 2009/12/09 21:32:58 dsl Exp $ */ /*- * Copyright (c) 1994, 2008, 2009 The NetBSD Foundation, Inc. @@ -34,7 +34,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: svr4_32_net.c,v 1.19 2009/04/04 10:12:51 ad Exp $"); +__KERNEL_RCSID(0, "$NetBSD: svr4_32_net.c,v 1.20 2009/12/09 21:32:58 dsl Exp $"); #define COMPAT_SVR4 1 @@ -102,7 +102,7 @@ static const struct fileops svr4_32_netops = { .fo_poll = soo_poll, .fo_stat = soo_stat, .fo_close = svr4_soo_close, - .fo_drain = soo_drain, + .fo_abort = soo_abort, }; diff --git a/sys/dev/dmover/dmover_io.c b/sys/dev/dmover/dmover_io.c index 323dc7169311..19cae16f55ae 100644 --- a/sys/dev/dmover/dmover_io.c +++ b/sys/dev/dmover/dmover_io.c @@ -1,4 +1,4 @@ -/* $NetBSD: dmover_io.c,v 1.35 2009/05/01 00:15:57 nonaka Exp $ */ +/* $NetBSD: dmover_io.c,v 1.36 2009/12/09 21:32:58 dsl Exp $ */ /* * Copyright (c) 2002, 2003 Wasabi Systems, Inc. @@ -55,7 +55,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: dmover_io.c,v 1.35 2009/05/01 00:15:57 nonaka Exp $"); +__KERNEL_RCSID(0, "$NetBSD: dmover_io.c,v 1.36 2009/12/09 21:32:58 dsl Exp $"); #include #include @@ -761,7 +761,7 @@ static const struct fileops dmio_fileops = { .fo_stat = dmio_stat, .fo_close = dmio_close, .fo_kqfilter = fnullop_kqfilter, - .fo_drain = fnullop_drain, + .fo_abort = fnullop_abort, }; /* diff --git a/sys/dev/putter/putter.c b/sys/dev/putter/putter.c index 14d31351ac08..acf9bf5c12b7 100644 --- a/sys/dev/putter/putter.c +++ b/sys/dev/putter/putter.c @@ -1,4 +1,4 @@ -/* $NetBSD: putter.c,v 1.24 2009/12/07 13:41:44 pooka Exp $ */ +/* $NetBSD: putter.c,v 1.25 2009/12/09 21:32:59 dsl Exp $ */ /* * Copyright (c) 2006, 2007 Antti Kantee. All Rights Reserved. @@ -35,7 +35,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: putter.c,v 1.24 2009/12/07 13:41:44 pooka Exp $"); +__KERNEL_RCSID(0, "$NetBSD: putter.c,v 1.25 2009/12/09 21:32:59 dsl Exp $"); #include #include @@ -206,7 +206,7 @@ static const struct fileops putter_fileops = { .fo_stat = putter_fop_stat, .fo_close = putter_fop_close, .fo_kqfilter = putter_fop_kqfilter, - .fo_drain = fnullop_drain, + .fo_abort = fnullop_abort, }; static int diff --git a/sys/kern/kern_descrip.c b/sys/kern/kern_descrip.c index a4d200b391bb..9793f63cf8e2 100644 --- a/sys/kern/kern_descrip.c +++ b/sys/kern/kern_descrip.c @@ -1,4 +1,4 @@ -/* $NetBSD: kern_descrip.c,v 1.200 2009/10/27 02:58:28 rmind Exp $ */ +/* $NetBSD: kern_descrip.c,v 1.201 2009/12/09 21:32:59 dsl Exp $ */ /*- * Copyright (c) 2008, 2009 The NetBSD Foundation, Inc. @@ -70,7 +70,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: kern_descrip.c,v 1.200 2009/10/27 02:58:28 rmind Exp $"); +__KERNEL_RCSID(0, "$NetBSD: kern_descrip.c,v 1.201 2009/12/09 21:32:59 dsl Exp $"); #include #include @@ -624,7 +624,7 @@ fd_close(unsigned fd) } /* Try to drain out descriptor references. */ - (*fp->f_ops->fo_drain)(fp); + (*fp->f_ops->fo_abort)(fp); mutex_enter(&fdp->fd_lock); /* @@ -1787,7 +1787,7 @@ fnullop_kqfilter(file_t *fp, struct knote *kn) } void -fnullop_drain(file_t *fp) +fnullop_abort(file_t *fp) { } diff --git a/sys/kern/kern_drvctl.c b/sys/kern/kern_drvctl.c index 1c6cfc543812..ae79d61f026b 100644 --- a/sys/kern/kern_drvctl.c +++ b/sys/kern/kern_drvctl.c @@ -1,4 +1,4 @@ -/* $NetBSD: kern_drvctl.c,v 1.29 2009/09/16 16:34:50 dyoung Exp $ */ +/* $NetBSD: kern_drvctl.c,v 1.30 2009/12/09 21:32:59 dsl Exp $ */ /* * Copyright (c) 2004 @@ -27,7 +27,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: kern_drvctl.c,v 1.29 2009/09/16 16:34:50 dyoung Exp $"); +__KERNEL_RCSID(0, "$NetBSD: kern_drvctl.c,v 1.30 2009/12/09 21:32:59 dsl Exp $"); #include #include @@ -90,7 +90,7 @@ static const struct fileops drvctl_fileops = { .fo_stat = drvctl_stat, .fo_close = drvctl_close, .fo_kqfilter = fnullop_kqfilter, - .fo_drain = fnullop_drain, + .fo_abort = fnullop_abort, }; #define MAXLOCATORS 100 diff --git a/sys/kern/kern_event.c b/sys/kern/kern_event.c index 080e54b19679..a59330fe1a2f 100644 --- a/sys/kern/kern_event.c +++ b/sys/kern/kern_event.c @@ -1,4 +1,4 @@ -/* $NetBSD: kern_event.c,v 1.66 2009/10/03 00:14:07 elad Exp $ */ +/* $NetBSD: kern_event.c,v 1.67 2009/12/09 21:32:59 dsl Exp $ */ /*- * Copyright (c) 2008, 2009 The NetBSD Foundation, Inc. @@ -58,7 +58,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: kern_event.c,v 1.66 2009/10/03 00:14:07 elad Exp $"); +__KERNEL_RCSID(0, "$NetBSD: kern_event.c,v 1.67 2009/12/09 21:32:59 dsl Exp $"); #include #include @@ -115,7 +115,7 @@ static const struct fileops kqueueops = { .fo_stat = kqueue_stat, .fo_close = kqueue_close, .fo_kqfilter = kqueue_kqfilter, - .fo_drain = fnullop_drain, + .fo_abort = fnullop_abort, }; static const struct filterops kqread_filtops = diff --git a/sys/kern/sys_mqueue.c b/sys/kern/sys_mqueue.c index 8dfc984b37d6..a3ea76a7807a 100644 --- a/sys/kern/sys_mqueue.c +++ b/sys/kern/sys_mqueue.c @@ -1,4 +1,4 @@ -/* $NetBSD: sys_mqueue.c,v 1.26 2009/11/01 21:46:09 rmind Exp $ */ +/* $NetBSD: sys_mqueue.c,v 1.27 2009/12/09 21:32:59 dsl Exp $ */ /* * Copyright (c) 2007-2009 Mindaugas Rasiukevicius @@ -42,7 +42,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: sys_mqueue.c,v 1.26 2009/11/01 21:46:09 rmind Exp $"); +__KERNEL_RCSID(0, "$NetBSD: sys_mqueue.c,v 1.27 2009/12/09 21:32:59 dsl Exp $"); #include #include @@ -102,7 +102,7 @@ static const struct fileops mqops = { .fo_stat = mq_stat_fop, .fo_close = mq_close_fop, .fo_kqfilter = fnullop_kqfilter, - .fo_drain = fnullop_drain, + .fo_abort = fnullop_abort, }; static const struct syscall_package mqueue_syscalls[] = { diff --git a/sys/kern/sys_pipe.c b/sys/kern/sys_pipe.c index c6fbf703e1cf..d861de11cbdd 100644 --- a/sys/kern/sys_pipe.c +++ b/sys/kern/sys_pipe.c @@ -1,4 +1,4 @@ -/* $NetBSD: sys_pipe.c,v 1.120 2009/12/06 20:26:55 dsl Exp $ */ +/* $NetBSD: sys_pipe.c,v 1.121 2009/12/09 21:32:59 dsl Exp $ */ /*- * Copyright (c) 2003, 2007, 2008, 2009 The NetBSD Foundation, Inc. @@ -68,7 +68,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: sys_pipe.c,v 1.120 2009/12/06 20:26:55 dsl Exp $"); +__KERNEL_RCSID(0, "$NetBSD: sys_pipe.c,v 1.121 2009/12/09 21:32:59 dsl Exp $"); #include #include @@ -119,7 +119,7 @@ static const struct fileops pipeops = { .fo_stat = pipe_stat, .fo_close = pipe_close, .fo_kqfilter = pipe_kqfilter, - .fo_drain = fnullop_drain, + .fo_abort = fnullop_abort, }; /* diff --git a/sys/kern/sys_socket.c b/sys/kern/sys_socket.c index 3fb16c65a7ca..e7c73efc55c2 100644 --- a/sys/kern/sys_socket.c +++ b/sys/kern/sys_socket.c @@ -1,4 +1,4 @@ -/* $NetBSD: sys_socket.c,v 1.61 2009/04/08 21:02:09 ad Exp $ */ +/* $NetBSD: sys_socket.c,v 1.62 2009/12/09 21:32:59 dsl Exp $ */ /*- * Copyright (c) 2008, 2009 The NetBSD Foundation, Inc. @@ -61,7 +61,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: sys_socket.c,v 1.61 2009/04/08 21:02:09 ad Exp $"); +__KERNEL_RCSID(0, "$NetBSD: sys_socket.c,v 1.62 2009/12/09 21:32:59 dsl Exp $"); #include #include @@ -89,7 +89,7 @@ const struct fileops socketops = { .fo_stat = soo_stat, .fo_close = soo_close, .fo_kqfilter = soo_kqfilter, - .fo_drain = fnullop_drain, /* soo_drain, */ + .fo_abort = soo_abort, }; /* ARGSUSED */ @@ -260,8 +260,8 @@ soo_close(file_t *fp) } void -soo_drain(file_t *fp) +soo_abort(file_t *fp) { - (void)sodrain(fp->f_data); + soabortop(fp->f_data); } diff --git a/sys/kern/uipc_socket.c b/sys/kern/uipc_socket.c index 954a292815c8..82793db88909 100644 --- a/sys/kern/uipc_socket.c +++ b/sys/kern/uipc_socket.c @@ -1,4 +1,4 @@ -/* $NetBSD: uipc_socket.c,v 1.194 2009/11/07 07:27:49 cegger Exp $ */ +/* $NetBSD: uipc_socket.c,v 1.195 2009/12/09 21:32:59 dsl Exp $ */ /*- * Copyright (c) 2002, 2007, 2008, 2009 The NetBSD Foundation, Inc. @@ -63,7 +63,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: uipc_socket.c,v 1.194 2009/11/07 07:27:49 cegger Exp $"); +__KERNEL_RCSID(0, "$NetBSD: uipc_socket.c,v 1.195 2009/12/09 21:32:59 dsl Exp $"); #include "opt_compat_netbsd.h" #include "opt_sock_counters.h" @@ -1624,18 +1624,16 @@ soshutdown(struct socket *so, int how) return error; } -int -sodrain(struct socket *so) +void +soabortop(struct socket *so) { - int error; - +#if 0 /* ad@ wrote this, then disabled it as 'not working' */ solock(so); - so->so_state |= SS_ISDRAINING; + so->so_state |= SS_ISABORTING; cv_broadcast(&so->so_cv); - error = soshutdown(so, SHUT_RDWR); + soshutdown(so, SHUT_RDWR); sounlock(so); - - return error; +#endif } void diff --git a/sys/kern/uipc_syscalls.c b/sys/kern/uipc_syscalls.c index 6d4a0089536e..1ea2263c02bb 100644 --- a/sys/kern/uipc_syscalls.c +++ b/sys/kern/uipc_syscalls.c @@ -1,4 +1,4 @@ -/* $NetBSD: uipc_syscalls.c,v 1.136 2009/04/04 10:12:51 ad Exp $ */ +/* $NetBSD: uipc_syscalls.c,v 1.137 2009/12/09 21:33:00 dsl Exp $ */ /*- * Copyright (c) 2008, 2009 The NetBSD Foundation, Inc. @@ -61,7 +61,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: uipc_syscalls.c,v 1.136 2009/04/04 10:12:51 ad Exp $"); +__KERNEL_RCSID(0, "$NetBSD: uipc_syscalls.c,v 1.137 2009/12/09 21:33:00 dsl Exp $"); #include "opt_pipe.h" @@ -317,7 +317,7 @@ do_sys_connect(struct lwp *l, int fd, struct mbuf *nam) } while ((so->so_state & SS_ISCONNECTING) != 0 && so->so_error == 0) { error = sowait(so, true, 0); - if (__predict_false((so->so_state & SS_ISDRAINING) != 0)) { + if (__predict_false((so->so_state & SS_ISABORTING) != 0)) { error = EPIPE; interrupted = 1; break; diff --git a/sys/kern/vfs_vnops.c b/sys/kern/vfs_vnops.c index 8d2c2366f06a..2fa268d178de 100644 --- a/sys/kern/vfs_vnops.c +++ b/sys/kern/vfs_vnops.c @@ -1,4 +1,4 @@ -/* $NetBSD: vfs_vnops.c,v 1.166 2009/05/17 05:54:42 yamt Exp $ */ +/* $NetBSD: vfs_vnops.c,v 1.167 2009/12/09 21:32:59 dsl Exp $ */ /*- * Copyright (c) 2009 The NetBSD Foundation, Inc. @@ -66,7 +66,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: vfs_vnops.c,v 1.166 2009/05/17 05:54:42 yamt Exp $"); +__KERNEL_RCSID(0, "$NetBSD: vfs_vnops.c,v 1.167 2009/12/09 21:32:59 dsl Exp $"); #include "veriexec.h" @@ -122,7 +122,7 @@ const struct fileops vnops = { .fo_stat = vn_statfile, .fo_close = vn_closefile, .fo_kqfilter = vn_kqfilter, - .fo_drain = fnullop_drain, + .fo_abort = fnullop_abort, }; /* diff --git a/sys/net/bpf.c b/sys/net/bpf.c index a5a297ae6595..66f1111ea529 100644 --- a/sys/net/bpf.c +++ b/sys/net/bpf.c @@ -1,4 +1,4 @@ -/* $NetBSD: bpf.c,v 1.148 2009/11/23 02:13:48 rmind Exp $ */ +/* $NetBSD: bpf.c,v 1.149 2009/12/09 21:32:59 dsl Exp $ */ /* * Copyright (c) 1990, 1991, 1993 @@ -39,7 +39,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: bpf.c,v 1.148 2009/11/23 02:13:48 rmind Exp $"); +__KERNEL_RCSID(0, "$NetBSD: bpf.c,v 1.149 2009/12/09 21:32:59 dsl Exp $"); #if defined(_KERNEL_OPT) #include "opt_bpf.h" @@ -165,7 +165,7 @@ static const struct fileops bpf_fileops = { .fo_stat = bpf_stat, .fo_close = bpf_close, .fo_kqfilter = bpf_kqfilter, - .fo_drain = fnullop_drain, + .fo_abort = fnullop_abort, }; dev_type_open(bpfopen); diff --git a/sys/net/if_tap.c b/sys/net/if_tap.c index aab403529136..7310e8109555 100644 --- a/sys/net/if_tap.c +++ b/sys/net/if_tap.c @@ -1,4 +1,4 @@ -/* $NetBSD: if_tap.c,v 1.60 2009/11/29 10:44:23 plunky Exp $ */ +/* $NetBSD: if_tap.c,v 1.61 2009/12/09 21:32:59 dsl Exp $ */ /* * Copyright (c) 2003, 2004, 2008, 2009 The NetBSD Foundation. @@ -33,7 +33,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: if_tap.c,v 1.60 2009/11/29 10:44:23 plunky Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if_tap.c,v 1.61 2009/12/09 21:32:59 dsl Exp $"); #if defined(_KERNEL_OPT) #include "bpfilter.h" @@ -161,7 +161,7 @@ static const struct fileops tap_fileops = { .fo_stat = tap_fops_stat, .fo_close = tap_fops_close, .fo_kqfilter = tap_fops_kqfilter, - .fo_drain = fnullop_drain, + .fo_abort = fnullop_abort, }; /* Helper for cloning open() */ diff --git a/sys/opencrypto/cryptodev.c b/sys/opencrypto/cryptodev.c index ee03a31001bc..98a6c459b1db 100644 --- a/sys/opencrypto/cryptodev.c +++ b/sys/opencrypto/cryptodev.c @@ -1,4 +1,4 @@ -/* $NetBSD: cryptodev.c,v 1.49 2009/04/11 23:05:26 christos Exp $ */ +/* $NetBSD: cryptodev.c,v 1.50 2009/12/09 21:32:59 dsl Exp $ */ /* $FreeBSD: src/sys/opencrypto/cryptodev.c,v 1.4.2.4 2003/06/03 00:09:02 sam Exp $ */ /* $OpenBSD: cryptodev.c,v 1.53 2002/07/10 22:21:30 mickey Exp $ */ @@ -64,7 +64,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: cryptodev.c,v 1.49 2009/04/11 23:05:26 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: cryptodev.c,v 1.50 2009/12/09 21:32:59 dsl Exp $"); #include #include @@ -157,7 +157,7 @@ static const struct fileops cryptofops = { .fo_stat = cryptof_stat, .fo_close = cryptof_close, .fo_kqfilter = fnullop_kqfilter, - .fo_drain = fnullop_drain, + .fo_abort = fnullop_abort, }; struct csession *cryptodev_csefind(struct fcrypt *, u_int); diff --git a/sys/sys/file.h b/sys/sys/file.h index 48c4087d31db..2648c7234bbe 100644 --- a/sys/sys/file.h +++ b/sys/sys/file.h @@ -1,4 +1,4 @@ -/* $NetBSD: file.h,v 1.68 2009/05/17 05:54:42 yamt Exp $ */ +/* $NetBSD: file.h,v 1.69 2009/12/09 21:33:00 dsl Exp $ */ /*- * Copyright (c) 2009 The NetBSD Foundation, Inc. @@ -100,7 +100,7 @@ struct file { int (*fo_stat) (struct file *, struct stat *); int (*fo_close) (struct file *); int (*fo_kqfilter) (struct file *, struct knote *); - void (*fo_drain) (struct file *); + void (*fo_abort) (struct file *); void (*fo_spare1) (void); void (*fo_spare2) (void); } *f_ops; @@ -162,7 +162,7 @@ int fbadop_write(struct file *, off_t *, struct uio *, kauth_cred_t, int); int fbadop_ioctl(struct file *, u_long, void *); int fbadop_close(struct file *); int fbadop_stat(struct file *, struct stat *); -void fnullop_drain(struct file *); +void fnullop_abort(struct file *); #endif /* _KERNEL */ diff --git a/sys/sys/socketvar.h b/sys/sys/socketvar.h index e823aa1736b1..baad6b50801d 100644 --- a/sys/sys/socketvar.h +++ b/sys/sys/socketvar.h @@ -1,4 +1,4 @@ -/* $NetBSD: socketvar.h,v 1.121 2009/09/11 22:06:29 dyoung Exp $ */ +/* $NetBSD: socketvar.h,v 1.122 2009/12/09 21:33:00 dsl Exp $ */ /*- * Copyright (c) 2008, 2009 The NetBSD Foundation, Inc. @@ -198,7 +198,7 @@ do { \ #define SS_CANTSENDMORE 0x010 /* can't send more data to peer */ #define SS_CANTRCVMORE 0x020 /* can't receive more data from peer */ #define SS_RCVATMARK 0x040 /* at mark on input */ -#define SS_ISDRAINING 0x080 /* draining fd references */ +#define SS_ISABORTING 0x080 /* aborting fd references - close() */ #define SS_ISDISCONNECTED 0x800 /* socket disconnected from peer */ #define SS_ASYNC 0x100 /* async i/o notify */ @@ -256,7 +256,7 @@ int soo_poll(file_t *, int); int soo_kqfilter(file_t *, struct knote *); int soo_close(file_t *); int soo_stat(file_t *, struct stat *); -void soo_drain(file_t *); +void soo_abort(file_t *); void sbappend(struct sockbuf *, struct mbuf *); void sbappendstream(struct sockbuf *, struct mbuf *); int sbappendaddr(struct sockbuf *, const struct sockaddr *, struct mbuf *, @@ -313,7 +313,7 @@ int sosend(struct socket *, struct mbuf *, struct uio *, int sosetopt(struct socket *, struct sockopt *); int so_setsockopt(struct lwp *, struct socket *, int, int, const void *, size_t); int soshutdown(struct socket *, int); -int sodrain(struct socket *); +void soabortop(struct socket *); void sowakeup(struct socket *, struct sockbuf *, int); int sockargs(struct mbuf **, const void *, size_t, int); int sopoll(struct socket *, int);