TianoCore EDK2 master
Loading...
Searching...
No Matches
TestAndClearBit.c File Reference
#include <Base.h>
#include <Library/SynchronizationLib.h>

Go to the source code of this file.

Functions

INT32 EFIAPI TestAndClearBit (IN INT32 Bit, IN VOID *Address)
 

Detailed Description

Implementation of TestAndClearBit using compare-exchange primitive

Copyright (C) 2015, Linaro Ltd. Copyright (c) 2015, Intel Corporation. All rights reserved.

SPDX-License-Identifier: BSD-2-Clause-Patent

Definition in file TestAndClearBit.c.

Function Documentation

◆ TestAndClearBit()

INT32 EFIAPI TestAndClearBit ( IN INT32  Bit,
IN VOID *  Address 
)

Atomically test and clear a bit.

Parameters
BitBit index to test in *Address
AddressThe Address to the buffer that contain the bit to test.
Returns
Value of the Bit before it was cleared.

Definition at line 16 of file TestAndClearBit.c.