Module Name: src
Committed By: njoly
Date: Fri Apr 9 11:47:18 UTC 2010
Modified Files:
src/sys/kern: kern_lwp.c
Log Message:
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.
To generate a diff of this commit:
cvs rdiff -u -r1.142 -r1.143 src/sys/kern/kern_lwp.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/sys/kern/kern_lwp.c
diff -u src/sys/kern/kern_lwp.c:1.142 src/sys/kern/kern_lwp.c:1.143
--- src/sys/kern/kern_lwp.c:1.142 Tue Apr 6 13:50:22 2010
+++ src/sys/kern/kern_lwp.c Fri Apr 9 11:47:17 2010
@@ -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. */