Re: vm_page_t related KBI [Was: Re: panic at vm_page_wire with

看板FB_current作者時間14年前 (2011/11/07 02:01), 編輯推噓0(000)
留言0則, 0人參與, 最新討論串6/37 (看更多)
--IUUPtLpdNqNE81UU Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sun, Nov 06, 2011 at 07:22:51AM -0800, mdf@freebsd.org wrote: > On Sun, Nov 6, 2011 at 4:43 AM, Kostik Belousov <kostikbel@gmail.com> wro= te: > > Regarding the _vm_page_lock() vs. vm_page_lock_func(), the mutex.h has > > a lot of violations in regard of the namespaces, IMO. The __* namespace > > is reserved for the language implementation, so our freestanding program > > (kernel) ignores the requirements of the C standard with the names like > > __mtx_lock_spin(). Using the name _vm_page_lock() is valid, but makes > > it not unreasonable for other developers to introduce reserved names. > > So I decided to use the suffixes. vm_map.h locking is free of these > > violations. >=20 > I'm pretty sure that when the C standard says, "the implementation", > they're referring to the compiler and OS it runs on. Which makes the > FreeBSD kernel part of "the implementation", which is precisely why so > many headers have defines that start with __ and then, if certain > posix defines are set, also uses non-__ versions of the name. For libc providing parts, required by standard, you are right. But our kernel is a freestanding program using a compiler, so in-kernel uses of the reserved namespace is a violation. --IUUPtLpdNqNE81UU Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.18 (FreeBSD) iEYEARECAAYFAk62uNsACgkQC3+MBN1Mb4gqpQCfQdG7yhZaVm0lbGb75HOrT0jJ YQAAoN1NhUXeIIzgUP2IXY/JRoZQq/MX =nf9h -----END PGP SIGNATURE----- --IUUPtLpdNqNE81UU--
文章代碼(AID): #1EjijYb4 (FB_current)
討論串 (同標題文章)
完整討論串 (本文為第 6 之 37 篇):
文章代碼(AID): #1EjijYb4 (FB_current)