Page MenuHomeFreeBSD

buf_ring: Support DEBUG_BUFRING in userspace
ClosedPublic

Authored by andrew on Jul 26 2024, 8:55 AM.
Tags
None
Referenced Files
Unknown Object (File)
Thu, Jul 2, 7:11 PM
Unknown Object (File)
Thu, Jun 25, 10:53 PM
Unknown Object (File)
Thu, Jun 25, 12:00 AM
Unknown Object (File)
Mon, Jun 22, 11:09 PM
Unknown Object (File)
Sun, Jun 7, 4:36 PM
Unknown Object (File)
Sun, Jun 7, 3:18 PM
Unknown Object (File)
May 17 2026, 4:42 PM
Unknown Object (File)
May 4 2026, 2:07 AM
Subscribers

Details

Summary

The only part of DEBUG_BUFRING we don't support in userspace is the
mutex checks. Add _KERNEL checks around these so we can enable the
extra debugging.

Sponsored by: Arm Ltd

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Skipped
Unit
Tests Skipped
Build Status
Buildable 58844
Build 55731: arc lint + arc unit

Event Timeline

This revision is now accepted and ready to land.Jul 26 2024, 12:27 PM

If this is useful in kernel, why hen why not use mutex from either normal libpthread or mtx from libstdthread? (The later seems to not have mtx_owned analog)

The mtx code appears to be a check that the correct mutex is being held by the kernel so only one thread can access the single-consumer functions at a time. In userspace the tests I wrote don't use a mutex as only one consumer thread is created when testing these functions.

This revision was automatically updated to reflect the committed changes.