Pass the correct TokenNumber into a CallbackOnSet notification function.  The value being passed in was off by 1.
Pass the correct TokenNumber into a CallbackOnSet notification function.  The value being passed in was off by 1.

This would not normally cause an issue because the correct notification function was being called.  There is only an issue if the same notification function is being used for multiple tokens, and the notification function needs to use the TokenNumber parameter to determine which token setting caused the callback function to be called.

Update the logic so the CallbackOnSet notification functions are not called with the internal PCD database lock in the acquired state.  This allows other PCD Get/Set operations to be performed from within a CallbackOnSet notification.

Update logic so the PCD database lock is not left in the acquired state when SetWorker() returns EFI_INVALID_PARAMETER.  


git-svn-id: 5648d1bec6962b0a6d1d1b40eba8cf5cdb62da3d@9981 6f19259b-4bc3-4df7-8a09-765794883524

MattDevo/edk2,MattDevo/edk2,MattDevo/edk2,MattDevo/edk2,MattDevo/edk2,MattDevo/edk2,MattDevo/edk2,MattDevo/edk2