Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 1 Jul 2020 13:30:28 +0300
From:      Konstantin Belousov <kostikbel@gmail.com>
To:        Hans Petter Selasky <hps@selasky.org>
Cc:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   Re: svn commit: r362829 - head/sys/compat/linuxkpi/common/src
Message-ID:  <20200701103028.GJ32126@kib.kiev.ua>
In-Reply-To: <6478a8b2-9bfc-a671-4087-c2de92fea239@selasky.org>
References:  <202007010823.0618Nvcu028770@repo.freebsd.org> <20200701092123.GI32126@kib.kiev.ua> <6478a8b2-9bfc-a671-4087-c2de92fea239@selasky.org>

next in thread | previous in thread | raw e-mail | index | archive | help
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



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