selclear() while exiting netsmb's custom copy of select(). PR kern/38123.
This commit is contained in:
parent
efbd47af45
commit
89d4a45927
|
@ -1,7 +1,7 @@
|
|||
/* $NetBSD: sys_generic.c,v 1.112 2008/03/01 14:16:51 rmind Exp $ */
|
||||
/* $NetBSD: sys_generic.c,v 1.113 2008/03/05 18:09:58 ad Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 2007 The NetBSD Foundation, Inc.
|
||||
* Copyright (c) 2007, 2008 The NetBSD Foundation, Inc.
|
||||
* All rights reserved.
|
||||
*
|
||||
* This code is derived from software contributed to The NetBSD Foundation
|
||||
|
@ -77,7 +77,7 @@
|
|||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: sys_generic.c,v 1.112 2008/03/01 14:16:51 rmind Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: sys_generic.c,v 1.113 2008/03/05 18:09:58 ad Exp $");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
|
@ -106,7 +106,6 @@ __KERNEL_RCSID(0, "$NetBSD: sys_generic.c,v 1.112 2008/03/01 14:16:51 rmind Exp
|
|||
|
||||
static int selscan(lwp_t *, fd_mask *, fd_mask *, int, register_t *);
|
||||
static int pollscan(lwp_t *, struct pollfd *, int, register_t *);
|
||||
static void selclear(void);
|
||||
|
||||
/* Global state for select()/poll(). */
|
||||
kmutex_t select_lock;
|
||||
|
@ -1168,7 +1167,7 @@ selnotify(struct selinfo *sip, int events, long knhint)
|
|||
/*
|
||||
* Remove an LWP from all objects that it is waiting for.
|
||||
*/
|
||||
static void
|
||||
void
|
||||
selclear(void)
|
||||
{
|
||||
struct selinfo *sip;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: smb_trantcp.c,v 1.31 2007/07/10 21:05:03 ad Exp $ */
|
||||
/* $NetBSD: smb_trantcp.c,v 1.32 2008/03/05 18:09:58 ad Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 2000-2001 Boris Popov
|
||||
|
@ -35,7 +35,7 @@
|
|||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: smb_trantcp.c,v 1.31 2007/07/10 21:05:03 ad Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: smb_trantcp.c,v 1.32 2008/03/05 18:09:58 ad Exp $");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
|
@ -201,6 +201,7 @@ nbssn_rselect(struct nbpcb *nbp, const struct timeval *tv, int events,
|
|||
|
||||
done:
|
||||
l->l_selflag = 0;
|
||||
selclear();
|
||||
mutex_exit(&select_lock);
|
||||
/* select is not restarted after signals... */
|
||||
if (error == ERESTART)
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: select.h,v 1.31 2008/03/01 14:16:52 rmind Exp $ */
|
||||
/* $NetBSD: select.h,v 1.32 2008/03/05 18:09:57 ad Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1992, 1993
|
||||
|
@ -53,6 +53,7 @@ void selnotify(struct selinfo *, int, long);
|
|||
void selsysinit(void);
|
||||
void selinit(struct selinfo *);
|
||||
void seldestroy(struct selinfo *);
|
||||
void selclear(void);
|
||||
|
||||
#else /* _KERNEL */
|
||||
|
||||
|
|
Loading…
Reference in New Issue