Upon further reflection, make lwp_{get,set}specific() operate only on
curlwp. Things that need to operate on "other" LWPs will get a very special (and very private) API for their needs.
This commit is contained in:
parent
ba3cb45cce
commit
42951eac01
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: kern_lwp.c,v 1.43 2006/10/09 00:39:06 martin Exp $ */
|
||||
/* $NetBSD: kern_lwp.c,v 1.44 2006/10/11 03:46:42 thorpej 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.43 2006/10/09 00:39:06 martin Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: kern_lwp.c,v 1.44 2006/10/11 03:46:42 thorpej Exp $");
|
||||
|
||||
#include "opt_multiprocessor.h"
|
||||
|
||||
|
@ -807,11 +807,11 @@ lwp_initspecific(struct lwp *l)
|
|||
* or lwp_setspecific() call).
|
||||
*/
|
||||
void *
|
||||
lwp_getspecific(struct lwp *l, specificdata_key_t key)
|
||||
lwp_getspecific(specificdata_key_t key)
|
||||
{
|
||||
|
||||
return (specificdata_getspecific_unlocked(lwp_specificdata_domain,
|
||||
&l->l_specdataref, key));
|
||||
&curlwp->l_specdataref, key));
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -823,5 +823,5 @@ lwp_setspecific(struct lwp *l, specificdata_key_t key, void *data)
|
|||
{
|
||||
|
||||
specificdata_setspecific(lwp_specificdata_domain,
|
||||
&l->l_specdataref, key, data);
|
||||
&curlwp->l_specdataref, key, data);
|
||||
}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: lwp.h,v 1.43 2006/10/08 22:57:11 christos Exp $ */
|
||||
/* $NetBSD: lwp.h,v 1.44 2006/10/11 03:46:42 thorpej Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 2001 The NetBSD Foundation, Inc.
|
||||
|
@ -205,8 +205,8 @@ void lwp_update_creds(struct lwp *);
|
|||
int lwp_specific_key_create(specificdata_key_t *, specificdata_dtor_t);
|
||||
void lwp_specific_key_delete(specificdata_key_t);
|
||||
void lwp_initspecific(struct lwp *);
|
||||
void * lwp_getspecific(struct lwp *, specificdata_key_t);
|
||||
void lwp_setspecific(struct lwp *, specificdata_key_t, void *);
|
||||
void * lwp_getspecific(specificdata_key_t);
|
||||
void lwp_setspecific(specificdata_key_t, void *);
|
||||
#endif /* _KERNEL */
|
||||
|
||||
/* Flags for _lwp_create(), as per Solaris. */
|
||||
|
|
Loading…
Reference in New Issue