OvmfPkg/XenBusDxe: Add TestAndClearBit.
This atomically test's and clear's a bit. Change in V3: - adding IA32 support. (not yet reviewed) both XenBusDxe/Ia32/TestAndClearBit.{S,asm} are new Change in V2: - Adding .asm version - Comment the function Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Anthony PERARD <anthony.perard@citrix.com> Reviewed-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com> Reviewed-by: Jordan Justen <jordan.l.justen@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16266 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
@@ -97,4 +97,23 @@ struct _XENBUS_DEVICE {
|
||||
shared_info_t *SharedInfo;
|
||||
};
|
||||
|
||||
/*
|
||||
* Helpers
|
||||
*/
|
||||
|
||||
/**
|
||||
Atomically test and clear a bit.
|
||||
|
||||
@param Bit Bit index to test in *Address
|
||||
@param Address The Address to the buffer that contain the bit to test.
|
||||
|
||||
@return Value of the Bit before it was cleared.
|
||||
**/
|
||||
INT32
|
||||
EFIAPI
|
||||
TestAndClearBit (
|
||||
IN INT32 Bit,
|
||||
IN volatile VOID *Address
|
||||
);
|
||||
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user