Date: Mon, 22 May 2023 00:18:14 +0200 From: Hans Petter Selasky <hps@selasky.org> To: Mark Millard <marklmi@yahoo.com>, freebsd-arch <freebsd-arch@freebsd.org> Subject: Re: [RFC] An idea for general kernel post-processing automation in FreeBSD Message-ID: <6293f06b-927f-432a-3911-808b1d99441b@selasky.org> In-Reply-To: <2EDDC5DC-81C2-4EB8-B729-66F03A8854E4@yahoo.com> References: <2EDDC5DC-81C2-4EB8-B729-66F03A8854E4.ref@yahoo.com> <2EDDC5DC-81C2-4EB8-B729-66F03A8854E4@yahoo.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On 5/21/23 23:24, Mark Millard wrote: > DEFINE_MUTEX is defined in: > > # grep -r "define.*DEFINE_MUTEX"/usr/main-src/sys/ | more > /usr/main-src/sys/compat/linuxkpi/common/include/linux/mutex.h:#define DEFINE_MUTEX(lock) Hi Mark, The mutex structure declared is still "static" and local to the C-file. There is no issue. If we could have a SX_STATIC_INIT() macro in FreeBSD, this would be a better solution, and would also save the crunch associated by SYSINITs. The LinuxKPI does not use Witness on these locks, because Linux has a bad habit of not destroying them, so FreeBSD Witness objects would leak and cause other problems when modules are reloaded for example. If witness is not needed, there is little use from sx_init(). It almost does nothing. --HPS
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?6293f06b-927f-432a-3911-808b1d99441b>