Page MenuHomeFreeBSD

umtx: Add bitset member to the struct umtx_q.
ClosedPublic

Authored by dchagin on Jul 20 2021, 2:09 PM.
Tags
None
Referenced Files
Unknown Object (File)
Thu, Mar 7, 8:43 PM
Unknown Object (File)
Feb 23 2024, 12:52 AM
Unknown Object (File)
Feb 20 2024, 9:13 AM
Unknown Object (File)
Jan 14 2024, 4:46 AM
Unknown Object (File)
Nov 13 2023, 7:55 AM
Unknown Object (File)
Nov 13 2023, 6:14 AM
Unknown Object (File)
Oct 25 2023, 10:39 PM
Unknown Object (File)
Sep 26 2023, 5:05 PM
Subscribers

Details

Summary

Bitset is a Linux emulation layer extension. This 32-bit mask, in which at least
one bit must be set, is used to select which threads should be woken up.

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 40574
Build 37463: arc lint + arc unit

Event Timeline

sys/kern/kern_umtx.c
569

Why is it hard-coded to SHARED_QUEUE?

sys/sys/umtxvar.h
124

There is a hole here on LP64, if you add the new field here the size of the structure will not grow.

sys/kern/kern_umtx.c
569

EXCLUSIVE_QUEUE used only by rw_lock, many umtx functions hide queue, umtxq_insert/umtxq_remove pair for example

sys/sys/umtxvar.h
124

good, thanks, will fix it

sys/kern/kern_umtx.c
570
if (uf == NULL)
  return (0);

Then decrease indent level by one.

571

I do not know the intent, but what if there is a hole in the queue WRT bitmask? I mean, e.g. if we have thee elements with the uq_bitset values 1, 2, 4, and bitset is 5. Then you miss the element 4.

sys/sys/umtxvar.h
126

If the field is 32bit mask, then might be uint32_t type is better? It is explicit.

whoops, perhaps I fixed it

This revision is now accepted and ready to land.Jul 21 2021, 7:20 PM