Add an accessor macro for cv_waiters, so that consumers do not access
cv_waiters directly, in similar fashion to cv_wmesg().
Sponsored by: The FreeBSD Foundation
MFC after: 2 days
Differential D47779
condvar: Add cv_waiters() macro christos on Wed, Nov 27, 3:32 PM. Authored by
Details
Diff Detail
Event TimelineComment Actions As I noted in the email thread, there is only one consumer outside of condvar implementation. Not sure if it's worthwhile catering to it rather than to fix it. Comment Actions Is there a reason (except maybe layering violations) that we do not want to do it this way and it's better to implement an additional counter in the driver? Comment Actions Also, cv_wmesg is kind of semi-private and it's used only for diagnostics (tracing). Comment Actions Alright. There are other places in the sound driver that cv_waiters is still accessed directly, so I will see how I can fix those as well. Comment Actions E.g., CHN_BROADCAST can just call cv_broadcastpri. Comment Actions Looks like there cv_waiters is also used for some diagnostic / tracing. |