From nobody Sun May 21 23:07:52 2023 X-Original-To: freebsd-arch@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4QPbpj1Q76z4CbsX for ; Sun, 21 May 2023 23:08:13 +0000 (UTC) (envelope-from marklmi@yahoo.com) Received: from sonic301-22.consmr.mail.gq1.yahoo.com (sonic301-22.consmr.mail.gq1.yahoo.com [98.137.64.148]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4QPbph5gYyz3Dw8 for ; Sun, 21 May 2023 23:08:12 +0000 (UTC) (envelope-from marklmi@yahoo.com) Authentication-Results: mx1.freebsd.org; none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1684710490; bh=Nk4tYLf99l4cFgLHf46srMw89zP8rU1LlLABHC9XmcM=; h=Subject:From:In-Reply-To:Date:Cc:References:To:From:Subject:Reply-To; b=risZdQB17F5+5SuSvXDFowVWgjLzlEsmi8KvxN6BAfp7cuDnD3GD0V9bYQqopuYLp9EG1wHF9EayQaREz4isMyKXSbuP9Ip5w5+jGJop3lQgJU5aD+k9htdUu3gpdzH8LBbOf7oMHZ9IMDFwEaTy/2bFWwRpu1TgCrcYByDoBcK4kR3l709ppkgvt03ZO5d0yMFPoYkgt9chLJ8hgUpvKvgQFB+ENtIF/eyVOMRSVqUep7eIf6Dy+9zrA6xcj15LWOZLPeTl4vafQECfm1yn3QfytMo/Vk9gK81fOs8x777PbhDPOtoQT01E+XdQDuZXVH6xN5PuIQGl1989GEzWOg== X-SONIC-DKIM-SIGN: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1684710490; bh=U3EA9+mJB9tkT3fiyNmw88vR0BCKdarU2/I3xJc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5bgL j5VYp26cOzqOoUhdPLYKDm4xSBoJrowmJn52KUqN9eXhvFZ3uj6bzc2efWOixJ2bbUBRwVOyJ.BX f8xqP4VWNn1s.Uja5Hny2nWBuuBygZZ1rmte8f.LhrUslQS25zMgpOqkUrQoxW.YO3fINtUAonDP Gl2TaCWtYTSRkTJv2M.21Z4CkJyj3h2tlrom8Pct6DVRaE1fCx5mQR3.mlKfXm8FIgFgz0EIe51j e_oTQ3DgtiFwQTnTygQkYFle5jDajAKkKs1rnGVaiwqgYKatCmdT18lNML_XEUllMU2EwdtplnIs Emubf927JrgX2UsKOWHQZNRM2XSMLu4faA_5lKXZHoQOOMhEQuCfTdF7EHidlpiF3G8aBjAAoKFp wtjATXPdPVhCSoAH7xJeJub.aNlZU4oVD5cw_0Gfipa4vHu3dN3brlGGJtm1ccV_tMVJpQUget86 7XwT82_.F9zrZwQhc8k2BgSSrVzTRgds.KoCiMwXMce0C9ZLG1f3OeLZfg6ZXQf0Bu6ZHJDHyLOj MQ1zI09DzCJhvkeBwr_jnMOP_WcA8k5iKbNbmOdwGH41ZivrwjXINDykIYcZTgp4yF6zoy_XVonp eENKR X-Sonic-MF: X-Sonic-ID: f66d01f3-72ab-4962-9b0f-40f552371cc3 Received: from sonic.gate.mail.ne1.yahoo.com by sonic301.consmr.mail.gq1.yahoo.com with HTTP; Sun, 21 May 2023 23:08:10 +0000 Received: by hermes--production-bf1-54475bbfff-dz5ln (Yahoo Inc. Hermes SMTP Server) with ESMTPA ID f2e3b8c255ec1da5bdbfd300f52c88fe; Sun, 21 May 2023 23:08:04 +0000 (UTC) Content-Type: text/plain; charset=us-ascii List-Id: Discussion related to FreeBSD architecture List-Archive: https://lists.freebsd.org/archives/freebsd-arch List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-arch@freebsd.org Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3731.400.51.1.1\)) Subject: Re: [RFC] An idea for general kernel post-processing automation in FreeBSD From: Mark Millard In-Reply-To: <6293f06b-927f-432a-3911-808b1d99441b@selasky.org> Date: Sun, 21 May 2023 16:07:52 -0700 Cc: freebsd-arch Content-Transfer-Encoding: quoted-printable Message-Id: References: <2EDDC5DC-81C2-4EB8-B729-66F03A8854E4.ref@yahoo.com> <2EDDC5DC-81C2-4EB8-B729-66F03A8854E4@yahoo.com> <6293f06b-927f-432a-3911-808b1d99441b@selasky.org> To: Hans Petter Selasky X-Mailer: Apple Mail (2.3731.400.51.1.1) X-Rspamd-Queue-Id: 4QPbph5gYyz3Dw8 X-Spamd-Bar: ---- X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:36647, ipnet:98.137.64.0/20, country:US] X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-ThisMailContainsUnwantedMimeParts: N On May 21, 2023, at 15:18, Hans Petter Selasky wrote: > 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) >=20 > Hi Mark, >=20 > The mutex structure declared is still "static" and local to the = C-file. There is no issue. In the C language standard, the original had a status of "no linkage" and "static storage duration". ("a block scope identifier for an object declared without the storage-class specifier extern" leads to the "no linkage" status.) The change still has "static storage duration" but now has "internal linkage" status instead. I'm being cautious about the distinction. (I'm looking at ISO/IEC 9899:2011 (E).) I've had trouble identifying the match of your wordings to the language standard, leaving me unsure of the interpretation to give your wording. I've yet to figure out why internal linkage could end up being required, given how the language specifies things. > 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. >=20 =3D=3D=3D Mark Millard marklmi at yahoo.com