HomeFreeBSD

hwpmc: split out PMC_OP_PMCATTACH/PMC_OP_PMCDETACH

Description

hwpmc: split out PMC_OP_PMCATTACH/PMC_OP_PMCDETACH

Begin splitting out the large chunks of functional logic from the
syscall handler into separate helper functions. This keeps it separate
from the syscall control-flow logic, resulting in better readability
overall. It also wins back a level of indentation.

For this and the similar changes to follow, try to keep copyin() and
copyout() calls outside of the helper functions. The changes are
intended to have no functional impact, but do address style issues.

Reviewed by: jkoshy
MFC after: 2 weeks
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D40291

Details

Provenance
mhorneAuthored on Jun 14 2023, 4:32 PM
Reviewer
jkoshy
Differential Revision
D40291: hwpmc: split out PMC_OP_PMCATTACH/PMC_OP_PMCDETACH
Parents
rGc498169442f3: hwpmc: split out PMC_FN_PROCESS_EXEC
Branches
Unknown
Tags
Unknown