Page MenuHomeFreeBSD

Add xx_NEW flag to mtx(9), sx(9), rmlock(9) and rwlock(9). A xx_NEW flag passed to xx_init_flags() to avoid check for double-init. Use MTX_NEW in cpu_init_clocks_bsp() when initializing PCPU timerstate mtx.
ClosedPublic

Authored by dchagin on Nov 22 2014, 11:05 AM.
Tags
None
Referenced Files
Unknown Object (File)
Feb 6 2024, 1:16 AM
Unknown Object (File)
Dec 19 2023, 4:30 PM
Unknown Object (File)
Nov 23 2023, 11:45 PM
Unknown Object (File)
Nov 6 2023, 8:14 PM
Unknown Object (File)
Oct 24 2023, 2:37 AM
Unknown Object (File)
Oct 12 2023, 12:43 AM
Unknown Object (File)
Oct 5 2023, 7:21 PM
Unknown Object (File)
Sep 30 2023, 7:10 PM
Subscribers

Details

Summary

I'll change man pages if the proposal would be approved.

Test Plan

fixex panic et_hw_mtx already initialized.

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Skipped
Unit
Tests Skipped

Event Timeline

dchagin retitled this revision from to Add xx_NEW flag to mtx(9), sx(9), rmlock(9) and rwlock(9). A xx_NEW flag passed to xx_init_flags() to avoid check for double-init. Use MTX_NEW in cpu_init_clocks_bsp() when initializing PCPU timerstate mtx..
dchagin edited the test plan for this revision. (Show Details)
dchagin added reviewers: mav, jhb.
dchagin updated this object.

Normally this is fixed by zero'ing the memory in question. That said, I've wanted a MTX_NEW for quite a while anyway. Please add the _NEW flags (along with man page updates) as a standalone commit from adding uses of them.

dchagin edited edge metadata.

Fixed.

Man pages changed, usage of MTX_NEW removed from patch.

The second and third man page changes are identical and the comments apply to them as well.

share/man/man9/mutex.9
180 ↗(On Diff #2550)

s/kernel compiled/kernel has been compiled/

185 ↗(On Diff #2550)

Sorry, this does not make sense. Is it supposed to be:

has not been initialized multiple times without intervening calls to

187 ↗(On Diff #2550)

s/unless/unless the/

The man pages look good to me. Please run igor -R and mandoc -Tlint on them before commit.

jhb edited edge metadata.
This revision is now accepted and ready to land.Dec 12 2014, 4:19 PM
dchagin updated this revision to Diff 2733.

Closed by commit rS275751 (authored by @dchagin).