From 42951eac0155e016655ae4978f5eb4bb9d2e5379 Mon Sep 17 00:00:00 2001 From: thorpej Date: Wed, 11 Oct 2006 03:46:42 +0000 Subject: [PATCH] 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. --- sys/kern/kern_lwp.c | 10 +++++----- sys/sys/lwp.h | 6 +++--- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/sys/kern/kern_lwp.c b/sys/kern/kern_lwp.c index f940706c867f..1495268d34e7 100644 --- a/sys/kern/kern_lwp.c +++ b/sys/kern/kern_lwp.c @@ -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 -__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); } diff --git a/sys/sys/lwp.h b/sys/sys/lwp.h index fc90e8aaec96..d1618c2ae988 100644 --- a/sys/sys/lwp.h +++ b/sys/sys/lwp.h @@ -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. */