Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/rump/fs/lib/libsyspuffs PR/975220: Check return of kthre...
details: https://anonhg.NetBSD.org/src/rev/70987dab5b3b
branches: trunk
changeset: 338105:70987dab5b3b
user: christos <christos%NetBSD.org@localhost>
date: Sun May 10 14:05:22 2015 +0000
description:
PR/975220: Check return of kthread_create
diffstat:
sys/rump/fs/lib/libsyspuffs/puffs_rumpglue.c | 15 +++++++++++----
1 files changed, 11 insertions(+), 4 deletions(-)
diffs (36 lines):
diff -r d0de1eb464a3 -r 70987dab5b3b sys/rump/fs/lib/libsyspuffs/puffs_rumpglue.c
--- a/sys/rump/fs/lib/libsyspuffs/puffs_rumpglue.c Sun May 10 14:00:42 2015 +0000
+++ b/sys/rump/fs/lib/libsyspuffs/puffs_rumpglue.c Sun May 10 14:05:22 2015 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: puffs_rumpglue.c,v 1.14 2015/05/10 14:00:42 christos Exp $ */
+/* $NetBSD: puffs_rumpglue.c,v 1.15 2015/05/10 14:05:22 christos Exp $ */
/*
* Copyright (c) 2008 Antti Kantee. All Rights Reserved.
@@ -29,7 +29,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: puffs_rumpglue.c,v 1.14 2015/05/10 14:00:42 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: puffs_rumpglue.c,v 1.15 2015/05/10 14:05:22 christos Exp $");
#include <sys/param.h>
#include <sys/conf.h>
@@ -197,8 +197,15 @@
pap->fpfd = curlwp->l_dupfd;
pap->fdp = curlwp->l_proc->p_fd;
- kthread_create(PRI_NONE, 0, NULL, readthread, pap, NULL, "rputter");
- kthread_create(PRI_NONE, 0, NULL, writethread, pap, NULL, "wputter");
+ rv = kthread_create(PRI_NONE, 0, NULL, readthread, pap, NULL,
+ "rputter");
+ if (rv)
+ return rv;
+
+ rv = kthread_create(PRI_NONE, 0, NULL, writethread, pap, NULL,
+ "wputter");
+ if (rv)
+ return rv;
*newfd = curlwp->l_dupfd;
return 0;
Home |
Main Index |
Thread Index |
Old Index