Try again.. Move l_cred into the startzero section, and fix the define.

Doesn't change the layout of struct lwp.
This commit is contained in:
ad 2006-07-20 00:17:10 +00:00
parent 131ecad106
commit fe65535924
2 changed files with 4 additions and 6 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: kern_lwp.c,v 1.37 2006/07/19 21:11:37 ad Exp $ */
/* $NetBSD: kern_lwp.c,v 1.38 2006/07/20 00:17:10 ad Exp $ */
/*-
* Copyright (c) 2001 The NetBSD Foundation, Inc.
@ -37,7 +37,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: kern_lwp.c,v 1.37 2006/07/19 21:11:37 ad Exp $");
__KERNEL_RCSID(0, "$NetBSD: kern_lwp.c,v 1.38 2006/07/20 00:17:10 ad Exp $");
#include "opt_multiprocessor.h"
@ -503,7 +503,6 @@ newlwp(struct lwp *l1, struct proc *p2, vaddr_t uaddr, boolean_t inmem,
l2->l_flag = inmem ? L_INMEM : 0;
l2->l_flag |= (flags & LWP_DETACHED) ? L_DETACHED : 0;
l2->l_cred = NULL;
lwp_update_creds(l2);
callout_init(&l2->l_tsleep_ch);

View File

@ -1,4 +1,4 @@
/* $NetBSD: lwp.h,v 1.39 2006/07/19 22:06:09 ad Exp $ */
/* $NetBSD: lwp.h,v 1.40 2006/07/20 00:17:10 ad Exp $ */
/*-
* Copyright (c) 2001 The NetBSD Foundation, Inc.
@ -62,9 +62,8 @@ struct lwp {
int l_stat;
lwpid_t l_lid; /* LWP identifier; local to process. */
#define l_startzero l_cred
struct kauth_cred *l_cred; /* Cached credentials */
#define l_startzero l_swtime
u_short l_acflag; /* Accounting flags */
u_int l_swtime; /* Time swapped in or out. */
u_int l_slptime; /* Time since last blocked. */