Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/share/examples/puffs/pgfs don't bother to call lo_close.
details: https://anonhg.NetBSD.org/src/rev/25d5c0c8ddaa
branches: trunk
changeset: 778738:25d5c0c8ddaa
user: yamt <yamt%NetBSD.org@localhost>
date: Wed Apr 11 14:28:18 2012 +0000
description:
don't bother to call lo_close.
as we ever open a few LOs at most in a transaction, just let them be closed
automatically at the end of the transaction.
diffstat:
share/examples/puffs/pgfs/pgfs_subs.c | 13 +++++++++++--
1 files changed, 11 insertions(+), 2 deletions(-)
diffs (41 lines):
diff -r da163d86763f -r 25d5c0c8ddaa share/examples/puffs/pgfs/pgfs_subs.c
--- a/share/examples/puffs/pgfs/pgfs_subs.c Wed Apr 11 14:27:43 2012 +0000
+++ b/share/examples/puffs/pgfs/pgfs_subs.c Wed Apr 11 14:28:18 2012 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: pgfs_subs.c,v 1.4 2012/04/11 14:26:19 yamt Exp $ */
+/* $NetBSD: pgfs_subs.c,v 1.5 2012/04/11 14:28:18 yamt Exp $ */
/*-
* Copyright (c)2010,2011 YAMAMOTO Takashi,
@@ -46,7 +46,7 @@
#include <sys/cdefs.h>
#ifndef lint
-__RCSID("$NetBSD: pgfs_subs.c,v 1.4 2012/04/11 14:26:19 yamt Exp $");
+__RCSID("$NetBSD: pgfs_subs.c,v 1.5 2012/04/11 14:28:18 yamt Exp $");
#endif /* not lint */
#include <assert.h>
@@ -335,6 +335,14 @@
int
my_lo_close(struct Xconn *xc, int32_t fd)
{
+#if 1
+ /*
+ * do nothing.
+ *
+ * LO handles are automatically closed at the end of transactions.
+ * our transactions are small enough.
+ */
+#else
static struct cmd *c;
int32_t ret;
int error;
@@ -349,6 +357,7 @@
return error;
}
assert(ret == 0);
+#endif
return 0;
}
Home |
Main Index |
Thread Index |
Old Index