Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/kern Make lwp_ctl_alloc() return 0 instead of EINVAL, wh...
details: https://anonhg.NetBSD.org/src/rev/e36c9e5c7a38
branches: trunk
changeset: 753760:e36c9e5c7a38
user: njoly <njoly%NetBSD.org@localhost>
date: Fri Apr 09 11:47:17 2010 +0000
description:
Make lwp_ctl_alloc() return 0 instead of EINVAL, when lwpctl user
address already exists. This allow calling _lwp_ctl(2) more than once
on the same LWP.
diffstat:
sys/kern/kern_lwp.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diffs (27 lines):
diff -r e1165022aadc -r e36c9e5c7a38 sys/kern/kern_lwp.c
--- a/sys/kern/kern_lwp.c Fri Apr 09 11:38:10 2010 +0000
+++ b/sys/kern/kern_lwp.c Fri Apr 09 11:47:17 2010 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: kern_lwp.c,v 1.142 2010/04/06 13:50:22 christos Exp $ */
+/* $NetBSD: kern_lwp.c,v 1.143 2010/04/09 11:47:17 njoly Exp $ */
/*-
* Copyright (c) 2001, 2006, 2007, 2008, 2009 The NetBSD Foundation, Inc.
@@ -209,7 +209,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: kern_lwp.c,v 1.142 2010/04/06 13:50:22 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: kern_lwp.c,v 1.143 2010/04/09 11:47:17 njoly Exp $");
#include "opt_ddb.h"
#include "opt_lockdebug.h"
@@ -1617,7 +1617,7 @@
if (l->l_lcpage != NULL) {
lcp = l->l_lcpage;
*uaddr = lcp->lcp_uaddr + (vaddr_t)l->l_lwpctl - lcp->lcp_kaddr;
- return (EINVAL);
+ return 0;
}
/* First time around, allocate header structure for the process. */
Home |
Main Index |
Thread Index |
Old Index