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)
Sat, Nov 16, 4:57 PM
Unknown Object (File)
Tue, Nov 12, 7:38 PM
Unknown Object (File)
Sat, Nov 9, 9:07 PM
Unknown Object (File)
Mon, Oct 21, 4:40 AM
Unknown Object (File)
Oct 11 2024, 11:20 AM
Unknown Object (File)
Oct 2 2024, 8:06 PM
Unknown Object (File)
Sep 24 2024, 3:47 AM
Unknown Object (File)
Sep 8 2024, 5:15 PM
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 Not Applicable
Unit
Tests Not Applicable

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.