svn commit: r362829 - head/sys/compat/linuxkpi/common/src

Konstantin Belousov kostikbel at gmail.com
Wed Jul 1 10:30:36 UTC 2020


On Wed, Jul 01, 2020 at 11:35:21AM +0200, Hans Petter Selasky wrote:
> On 2020-07-01 11:21, Konstantin Belousov wrote:
> > It should be expressed as pget(pid, 0); instead of duplicating.
> 
> Hi,
> 
> Currently the LinuxKPI style is to use tdfind() and pfind(). If you look at
> linux_current.c you see multiple uses of the exact same syntax.
> 
> Quickly looking at the pget() implementation, I see it doesn't expand to
> exactly tdfind() and pfind(). pget() uses pfind_tid() which looks overkill
> compared to tdfind(). tdfind() uses a hash-table lookup, while pfind_tid()
> doesn't .... I'm confused.

It is trivial to change pget() to use tdfind(),
https://reviews.freebsd.org/D25532

I see no point in repeating the same pfind/tdfind calls, better to convert
them to pget(), and have this code in one intended place.




the sam


More information about the svn-src-all mailing list