Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 29 Mar 2002 14:32:22 -0500 (EST)
From:      John Baldwin <jhb@FreeBSD.org>
To:        arch@FreeBSD.org
Subject:   curthread vs. passing thread pointers around
Message-ID:  <XFMail.20020329143222.jhb@FreeBSD.org>

next in thread | raw e-mail | index | archive | help
During a discussion on the smp@ list about changes to the suser()
API to make use of td_ucred, it was brought up that the new suser()
would be assuming that the passed in thread pointer was curthread
so why not just use curthread in suser() and not pass in a pointer
at all.  There are several places in the kernel where the same
assumption is made.  Thus, my question is: which general approach
should we follow, and should we perhaps switch to using explicit
curthread's everywhere and stop passing thread pointers around on
the stack?

-- 

John Baldwin <jhb@FreeBSD.org>  <><  http://www.FreeBSD.org/~jhb/
"Power Users Use the Power to Serve!"  -  http://www.FreeBSD.org/

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-arch" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?XFMail.20020329143222.jhb>