Article View: muc.lists.netbsd.source-changes
Article #12Re: CVS commit: src/sys/dev/usb
From: Jason Thorpe
Date: Fri, 23 Oct 2026 16:56
Date: Fri, 23 Oct 2026 16:56
73 lines
7781 bytes
7781 bytes
--Apple-Mail=_C147AB54-D9D7-4E37-AACB-555E1E059C28 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 > On Oct 23, 2026, at 9:48=E2=80=AFAM, Jason Thorpe <thorpej@me.com> = wrote: >=20 > Counter-argument: Use of a ctor guarantees that the object will be = returned to the caller in the constructed state. The only difference = with the =E2=80=9Czero=E2=80=9D constructor is when it has to be called = in order to make that guarantee. Ok, =E2=80=9Cguarantees=E2=80=9D is maybe too strong of a statement. = Part of the pool_cache API contract is that, when using a constructor, = you=E2=80=99ll also put things back into the cache in a valid = constructed state (this is the same behavior as Solaris=E2=80=99s = kmem_cache). But I don=E2=80=99t think that invalidates my argument here. It=E2=80=99s= still part of the API contract that pool_cache_get() returns a = constructed object. -- thorpej --Apple-Mail=_C147AB54-D9D7-4E37-AACB-555E1E059C28 Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=utf-8 <html aria-label=3D"message body"><head><meta http-equiv=3D"content-type" = content=3D"text/html; charset=3Dutf-8"></head><body = style=3D"overflow-wrap: break-word; -webkit-nbsp-mode: space; = line-break: after-white-space;"><br><div><blockquote type=3D"cite"><div>On= Oct 23, 2026, at 9:48=E2=80=AFAM, Jason Thorpe <thorpej@me.com> = wrote:</div><div><div style=3D"overflow-wrap: break-word; = -webkit-nbsp-mode: space; line-break: = after-white-space;"><br><div>Counter-argument: Use of a ctor guarantees = that the object will be returned to the caller in the constructed state. = The only difference with the =E2=80=9Czero=E2=80=9D constructor is = when it has to be called in order to make that = guarantee.</div></div></div></blockquote><div><br></div><div>Ok, = =E2=80=9Cguarantees=E2=80=9D is maybe too strong of a statement. = Part of the pool_cache API contract is that, when using a = constructor, you=E2=80=99ll also put things back into the cache in a = valid constructed state (this is the same behavior as Solaris=E2=80=99s = kmem_cache).</div><div><br></div><div>But I don=E2=80=99t think that = invalidates my argument here. It=E2=80=99s still part of the API = contract that pool_cache_get() returns a constructed = object.</div></div><br><div> <span class=3D"Apple-style-span" style=3D"border-collapse: separate; = color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; = font-style: normal; font-variant: normal; font-weight: normal; = letter-spacing: normal; line-height: normal; orphans: 2; text-align: = auto; text-indent: 0px; text-transform: none; white-space: normal; = widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; = -webkit-border-vertical-spacing: 0px; = -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: = auto; -webkit-text-stroke-width: 0px; "><div style=3D"word-wrap: = break-word; -webkit-nbsp-mode: space; -webkit-line-break: = after-white-space; ">-- thorpej</div></span> </div> <br></body></html>= --Apple-Mail=_C147AB54-D9D7-4E37-AACB-555E1E059C28-- -- Posted automagically by a mail2news gateway at muc.de e.V. Please direct questions, flames, donations, etc. to news-admin@muc.de
Technical Details
Message-ID:
<23758C56-FD45-4BE7-A44D-001FDD5311B4@me.com>Path:
mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!2.eu.feeder.erje.net!feeder.erje.net!news2.arglkargh.de!news.karotte.org!news.space.net!news.muc.de!.POSTED.news.muc.de!not-for-mailReferences:
<06836EF3-F904-47ED-9429-84E731D3BF24@me.com> <>Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!2.eu.feeder.erje.net!feeder.erje.net!news2.arglkargh.de!news.karotte.org!news.space.net!news.muc.de!.POSTED.news.muc.de!not-for-mail From: Jason Thorpe <thorpej@me.com> Newsgroups: muc.lists.netbsd.source-changes Subject: Re: CVS commit: src/sys/dev/usb Date: Fri, 23 Oct 2026 09:56:18 -0700 Organization: Newsgate at muc.de e.V. Sender: source-changes-d-owner@NetBSD.org Approved: news-admin@muc.de Distribution: world Message-ID: <23758C56-FD45-4BE7-A44D-001FDD5311B4@me.com> References: <06836EF3-F904-47ED-9429-84E731D3BF24@me.com> <> MIME-Version: 1.0 (Mac OS X Mail 16.0 \(3864.500.181\)) Content-Type: multipart/alternative; boundary="Apple-Mail=_C147AB54-D9D7-4E37-AACB-555E1E059C28" Injection-Info: news.muc.de; posting-host="news.muc.de:193.149.48.2"; logging-data="61133"; mail-complaints-to="news-admin@muc.de" Authentication-Results: mail.netbsd.org (amavisd-new); dkim=pass (2048-bit key) header.d=me.com X-ICL-RepId: 01a169b1-4e18-7909-a437-f019ef66dc5f X-ICL-Out-Info: HUtFAUMEWwJACUgATUQeDx5WFlZNRAJCTQhPHVwGRQNGC1YBWQJLVxQEDFsCRRtXGnkVVkNUBF9QXxwOAFJFUR9UWEEOCl4SGFwUXFBYHkYSVg1dCRkGQV5QG18CQg8cE1YVEx1DGQ8rCEoEQwdFAl4LJRMJU1ZfFRcbXAAXBlsUBEQBXgBeCjMMTh4rc18HXQ06dloaKgZEfVUDXQYtdjQMSwJcdV9yHVxWUAJaVRIEQAhWUF4IXh9MHA== Dkim-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=me.com; s=1a1hai; t=1792774591; x=1824310591; bh=p8JjZ7uTXDEW/BYFw7Bqtu0KRs8SSsXmyaKQnLMuuU4=; h=From:Message-Id:Content-Type:Mime-Version:Subject:Date:To:x-icloud-hme; b=GcD8UshFALQOW6zemBSrTOHhJ0g82B3WXeMWCbfZyDG2c9nGnB6ql3+5nITL3bC86cQnoURMY1aURsvCRYxLc8oFVuu6Iz9+uM+trSEv74u2ctSmBiBOZBf33eoRRwjCdrVdyNwYvG+l2MNklI0AZfnMK1KY4rp4l2AZiC5QXnQ67K9SYx2J2LA+mBDJHhSyPKWvXLuCr4GuXBdTi3AlrQTBKk6pTKnErOF5n+axUMhmUVthBqDNa4SdCOWicryqLqruXUt/zrdDLKOkGi5VGxL8fQ5OIDHSU0llk3o7tWxZBOTgLUKNG/cP7bYIUCtgGfvNbrMlstxhS1uKG/1eHw== In-Reply-To: <06836EF3-F904-47ED-9429-84E731D3BF24@me.com> X-Proofpoint-GUID: Bj0Wb4Ogq63trLRGxGjGiuzlFyWfwjmT X-Proofpoint-ORIG-GUID: Bj0Wb4Ogq63trLRGxGjGiuzlFyWfwjmT X-Authority-Info-Out: v=2.4 cv=Z9/h3XRA c=1 sm=1 tr=0 ts=6adb91be cx=c_apl:c_pps:t_out a=kRaGL2Q7qLiahLf3O6OaIA==:117 a=kRaGL2Q7qLiahLf3O6OaIA==:17 a=660iZSQnnn4A:10 a=x7bEGLp0ZPQA:10 a=hNn9FkxD5tsA:10 a=VkNPw1HP01LnGYTKEx00:22 a=HHGDD-5mAAAA:8 a=ray88mOUGgR_H08dKhMA:9 a=QEXdDO2ut3YA:10 a=OdrpZ5hs6bIziNdNaJ0A:9 a=Z4Ls0L-1ruYOGis1:21 a=_W_S_7VecoQA:10 X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYxMDIzMDA2NiBTYWx0ZWRfX84QpYXmLSv1v C1/McJtM3IYtZ1avFi0HgnpQisG9KWuaS3yqUT4ABnbNgTv1DjW2HYBcXDZW/7P7HE4WHWw2UHq UMSeI/9dbfI/YD5gIegDDzXe9wMAQ0W5HXq0zP9FfuqgaMRftMKw5mCn7JoiDtv2zbCaEFS9jPh 3lrt4lzMCJrYwlWi7ZZTXn000uIwbQsYLjhIgFyyJrfuAuJ1O6P7S0JY7mBaz6gFl7mgfAPZjMT evw8ulDCI6SL/KT9tOukf5UrQQz1R3jnsaR5bv6hU7k9HTTWCeRK4wsjsR7AfOlP1A9toAYxg/Z drHGEKNa6nGPLWp1QFtWBHith+ys2wbLt4NFSQKnlLymNSvqAq5Gm5tq3lZo54= X-JNJ: AAAAAAABlVPjptMBctfWjDGf91HYbX0J987sMfZLj1xkFhdAUJlATGjVhScQf3f7WzkvlXm/q3rjYy41NB5l3iiGIlCvq2DHquTix29rbIODhiiqG8ll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