Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/fs/puffs Allow clients to reuse a "park".
details: https://anonhg.NetBSD.org/src/rev/64a44006b8e5
branches: trunk
changeset: 758671:64a44006b8e5
user: pooka <pooka%NetBSD.org@localhost>
date: Fri Nov 12 17:46:09 2010 +0000
description:
Allow clients to reuse a "park".
Patch from <yamt>, fixes PR kern/44086 by him.
diffstat:
sys/fs/puffs/puffs_msgif.c | 12 ++++++++++--
1 files changed, 10 insertions(+), 2 deletions(-)
diffs (33 lines):
diff -r 5885e9d5cd12 -r 64a44006b8e5 sys/fs/puffs/puffs_msgif.c
--- a/sys/fs/puffs/puffs_msgif.c Fri Nov 12 17:35:34 2010 +0000
+++ b/sys/fs/puffs/puffs_msgif.c Fri Nov 12 17:46:09 2010 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: puffs_msgif.c,v 1.82 2010/07/06 17:00:06 pooka Exp $ */
+/* $NetBSD: puffs_msgif.c,v 1.83 2010/11/12 17:46:09 pooka Exp $ */
/*
* Copyright (c) 2005, 2006, 2007 Antti Kantee. All Rights Reserved.
@@ -30,7 +30,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: puffs_msgif.c,v 1.82 2010/07/06 17:00:06 pooka Exp $");
+__KERNEL_RCSID(0, "$NetBSD: puffs_msgif.c,v 1.83 2010/11/12 17:46:09 pooka Exp $");
#include <sys/param.h>
#include <sys/atomic.h>
@@ -332,6 +332,14 @@
struct puffs_req *preq, *creq;
ssize_t delta;
+ /*
+ * Some clients reuse a park, so reset some flags. We might
+ * want to provide a caller-side interface for this and add
+ * a few more invariant checks here, but this will do for now.
+ */
+ park->park_flags &= ~(PARKFLAG_DONE | PARKFLAG_HASERROR);
+ KASSERT((park->park_flags & PARKFLAG_WAITERGONE) == 0);
+
mp = PMPTOMP(pmp);
preq = park->park_preq;
Home |
Main Index |
Thread Index |
Old Index