Page MenuHomeFreeBSD

allow late binding of linux_alloc_current

Authored by mmacy on Feb 19 2019, 10:47 PM.



lindebugfs may be used independently of the lkpi. This allows it to call linux_alloc_current without having a static dependency.

Diff Detail

rS FreeBSD src repository
Automatic diff as part of commit; lint not applicable.
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

mmacy created this revision.Feb 19 2019, 10:47 PM
hselasky added inline comments.Feb 20 2019, 7:59 AM
223 ↗(On Diff #54098)

The alloc_current pointer should be set before registering the eventhandler.

246 ↗(On Diff #54098)

the alloc_current pointer should be cleared after deregistering the eventhandler.

109 ↗(On Diff #54098)

Is the header file for this prototype included?

hselasky added inline comments.Feb 20 2019, 8:02 AM
49 ↗(On Diff #54098)

For sake of optimisation I want you to always set the lkpi_alloc_current pointer.

I.E. In main make a lkpi_default_alloc_current() function, which is used to initialize the pointer and does nothing.

mmacy updated this revision to Diff 54151.Feb 20 2019, 9:10 PM
  • incorporate feedback
hselasky accepted this revision.Feb 22 2019, 9:43 PM

Looks good.

113 ↗(On Diff #54151)

I wonder if it is more correct that the noop function returns EINVAL, or something like that.

This revision is now accepted and ready to land.Feb 22 2019, 9:43 PM
This revision was automatically updated to reflect the committed changes.