API Reference | developer.brewmp.com API Reference | developer.brewmp.com

Developer

API Reference

IRESOURCECTL_CANACQUIRE()

Brew Release
Brew MP 1.0.2
See Also
IResourceCtl_Free()
Description
This function is used to query whether the caller may acquire control of the resource. It is also used to update the reason for holding the reason, if the reason changes. It is alwasy possible, however that the state of the resource may change at anytime such that a subsequent call to IResourceCtl_Acquire() may still fail.
Params
po
[in]:
Pointer to IRESOURCECTL interface.
dwReason
[in]:
Reason for requesting/holding resource. This can be either a RESCTL_REASON or a group/privilege id.
pdwStatus
[out]:
current RESCTL_STATUS of the resource.
Interface
Prototype
  •    int IResourceCtl_CanAcquire(IResourceCtl * po, uint32 dwReason, uint32 * pdwStatus)
    
Return
  • AEE_SUCCESS: if caller can acquire resource. Error code if not successful.
Side Effect
  • None
Comments
The underlying Request function manages both the Acquire() and Free() functionality. If a dwReason of RESCTL_REASON_RELINQUISH is given, the resource is free'd.