Page MenuHomeFreeBSD

Move map lookup into a separate function.

Authored by jeff on Tue, Jan 21, 7:42 PM.



I'm not totally in love with the vm return codes. However, I am following a pattern that exists elsewhere in this file where RESOURCE_SHORTAGE means restart.

This should be functionally identical.

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

jeff created this revision.Tue, Jan 21, 7:42 PM
jeff edited the summary of this revision. (Show Details)Tue, Jan 21, 7:51 PM
jeff added reviewers: alc, dougm, kib, markj.
jeff set the repository for this revision to rS FreeBSD src repository.
kib accepted this revision.Tue, Jan 21, 9:00 PM
kib added inline comments.
878 ↗(On Diff #67114)

You can write this cleaner IMO:

        goto RetryFault;
if (result != KERN_SUCCESS)
         return (result);
This revision is now accepted and ready to land.Tue, Jan 21, 9:00 PM
markj accepted this revision.Wed, Jan 22, 8:21 PM
markj added inline comments.
878 ↗(On Diff #67114)

Wouldn't that result in two comparisons instead of one in the common case?

This revision was automatically updated to reflect the committed changes.