Defines, Structures, Typedefs, Functions.
More...
Typedefs |
typedef ClRcT(* | ClBitmapWalkCbT )(ClBitmapHandleT hBitmap, ClUint32T bitNum, void *pCookie) |
| Callback function type, which is executed during the walk on a bitmap.
|
Functions |
ClRcT | clBitmap2BufferGet (CL_IN ClBitmapHandleT hBitmap, CL_OUT ClUint32T *pListLen, CL_OUT ClUint8T **ppPositionList) |
| Get the buffer corresponding to a bitmap.
|
ClRcT | clBitmap2PositionListGet (CL_IN ClBitmapHandleT hBitmap, CL_OUT ClUint32T *pListLen, CL_OUT ClUint32T **ppPositionList) |
| Get the position list corresponding to a bitmap.
|
ClRcT | clBitmapBitClear (CL_IN ClBitmapHandleT hBitmap, CL_IN ClUint32T bitNum) |
| Clear a bit of the bitmap.
|
ClRcT | clBitmapBitSet (CL_IN ClBitmapHandleT hBitmap, CL_IN ClUint32T bitNum) |
| Set a bit of the bitmap.
|
ClRcT | clBitmapBuffer2BitmapGet (CL_IN ClUint32T listLen, CL_IN ClUint8T *pPositionList, CL_OUT ClBitmapHandleT *phBitmap) |
| Get the bitmap corresponding to a bitmap buffer.
|
ClRcT | clBitmapBufferBitsCopy (CL_IN ClUint32T listLen, CL_IN ClUint8T *pPositionList, CL_IN ClBitmapHandleT hBitmap) |
| Set the bitmap bits corresponding to the bits in buffer.
|
ClRcT | clBitmapCreate (CL_OUT ClBitmapHandleT *phBitmap, CL_IN ClUint32T bitNum) |
| Create a bitmap.
|
ClRcT | clBitmapDestroy (CL_IN ClBitmapHandleT hBitmap) |
| Destroy a bitmap.
|
ClInt32T | clBitmapIsBitSet (CL_IN ClBitmapHandleT hBitmap, CL_IN ClUint32T bitNum, CL_OUT ClRcT *pRetCode) |
| Find the status of a bit (Set or Clear) in a bitmap.
|
ClUint32T | clBitmapLen (CL_IN ClBitmapHandleT hBitmap) |
| Get the length of a bitmap.
|
ClRcT | clBitmapNextClearBitSetNGet (CL_IN ClBitmapHandleT hBitmap, CL_IN ClUint32T length, CL_OUT ClUint32T *pBitSet) |
| Set the next clear bit and get that bit number.
|
ClRcT | clBitmapNumBitsSet (CL_IN ClBitmapHandleT hBitmap, CL_OUT ClUint32T *pNumBits) |
| Number of bits set in a bitmap.
|
ClRcT | clBitmapPositionList2BitmapGet (CL_IN ClUint32T listLen, CL_IN ClUint32T *pPositionList, CL_OUT ClBitmapHandleT *phBitmap) |
| Get the bitmap corresponding to a bitmap position list.
|
ClRcT | clBitmapWalk (CL_IN ClBitmapHandleT hBitmap, CL_IN ClBitmapWalkCbT fpUserSetBitWalkCb, CL_IN void *pCookie) |
| Perform locked walk on a bitmap.
|
ClRcT | clBitmapWalkUnlocked (CL_IN ClBitmapHandleT hBitmap, CL_IN ClBitmapWalkCbT fpUserSetBitWalkCb, CL_IN void *pCookie) |
| Perform unlocked walk on a bitmap.
|
Detailed Description
Defines, Structures, Typedefs, Functions.
Function Documentation
ClRcT clBitmap2BufferGet |
( |
CL_IN ClBitmapHandleT |
hBitmap, |
|
|
CL_OUT ClUint32T * |
pListLen, |
|
|
CL_OUT ClUint8T ** |
ppPositionList |
|
) |
| |
Get the buffer corresponding to a bitmap.
- Header File:
- clBitmapApi.h
- Parameters
-
hBitmap | (in) This parameter is bitmap handle. |
pListLen | (out) On success this parameter is set to the length of the buffer (allocated by this function) |
ppPositionList | (out) On success this parameter contains the reference to the buffer (this functiion allocates memory to the buffer and fills the bitmap info into it.) |
- Return values
-
CL_OK | The function executed successfully. |
CL_ERR_INVALID_HANDLE | On passing invalid bitmap handle. |
CL_ERR_NULL_POINTER | On passing any of the pointer parameter as NULL. |
- Description:
- This function is used to get the bitmap info(which bit is set and which one is not) into a buffer. Bit in buffer is set if the corresponding bit in bitmap is set. The memory for the buffer is allocated in this function, this memory is freeed by the user using clHeapFree().
- Library File:
- ClUtil
- See Also
- clBitmapBuffer2BitmapGet()
ClRcT clBitmap2PositionListGet |
( |
CL_IN ClBitmapHandleT |
hBitmap, |
|
|
CL_OUT ClUint32T * |
pListLen, |
|
|
CL_OUT ClUint32T ** |
ppPositionList |
|
) |
| |
Get the position list corresponding to a bitmap.
- Header File:
- clBitmapApi.h
- Parameters
-
hBitmap | (in) This parameter is bitmap handle. |
pListLen | (out) On success this parameter is set to the length of the buffer (allocated by this function) |
ppPositionList | (out) On success this parameter contains the reference to the position list (this functiion allocates memory to the position list and fills the bitmap info into it.) |
- Return values
-
CL_OK | The function executed successfully. |
CL_ERR_INVALID_HANDLE | On passing invalid bitmap handle. |
CL_ERR_NULL_POINTER | On passing any of the pointer parameter as NULL. |
- Description:
- This function is used to get the bitmap info (only which bit is set) into a position list. An element of position list identifies that which bit is set. Memory for position list is allocated in this function, and this memory is freeed by the user using clHeapFree().
- Library File:
- ClUtil
- See Also
- clBitmapPositionList2BitmapGet()
ClRcT clBitmapBitClear |
( |
CL_IN ClBitmapHandleT |
hBitmap, |
|
|
CL_IN ClUint32T |
bitNum |
|
) |
| |
Clear a bit of the bitmap.
- Header File:
- clBitmapApi.h
- Parameters
-
hBitmap | (in) This parameter is bitmap handle. |
bitNum | (in) The bit number which is to be cleared. |
- Return values
-
CL_OK | The function executed successfully. |
CL_ERR_INVALID_HANDLE | On passing invalid bitmap handle. |
CL_ERR_INVALID_PARAMETER | On passing invalid bitnum (bit number greater than the length of bitmap). |
- Description:
- This function is used to clear (set to 0)the specified bit. If the specified bit number is greater than the length of the bitmap then error is returned.
- Note
- If the specified bit is already clear, CL_OK is returned.
- Library File:
- ClUtil
- See Also
- clBitmapBitSet()
ClRcT clBitmapBitSet |
( |
CL_IN ClBitmapHandleT |
hBitmap, |
|
|
CL_IN ClUint32T |
bitNum |
|
) |
| |
Set a bit of the bitmap.
- Header File:
- clBitmapApi.h
- Parameters
-
hBitmap | (in) This parameter is bitmap handle. |
bitNum | (in) The bit number which is to be set. |
- Return values
-
CL_OK | The function executed successfully. |
CL_ERR_INVALID_HANDLE | On passing invalid bitmap handle. |
- Description:
- This function is used to set the specified bit to 1. If the specified bit number is greater than the length of the bitmap then bitmap length is extended to the bitnum and then that bit is set. In the later case the bit map attribute - [number of bits in the bitmap] is updated to the new value.
- Note
- If the specified bit is already set, CL_OK is returned.
- Library File:
- ClUtil
- See Also
- clBitmapBitClear(), clBitmapNextClearBitSetNGet()
ClRcT clBitmapBuffer2BitmapGet |
( |
CL_IN ClUint32T |
listLen, |
|
|
CL_IN ClUint8T * |
pPositionList, |
|
|
CL_OUT ClBitmapHandleT * |
phBitmap |
|
) |
| |
Get the bitmap corresponding to a bitmap buffer.
- Header File:
- clBitmapApi.h
- Parameters
-
listLen | (in) This parameter contains the length of the bitmap buffer |
ppPositionList | (in) This parameter contains the bitmap buffer |
phBitmap | (out) On success it contains pointer to the newly created bitmap handle. |
- Return values
-
CL_OK | The function executed successfully. |
CL_ERR_NULL_POINTER | On passing any of the pointer parameter as NULL. |
- Description:
- This function is used to get the bitmap corresponding to a bitmap buffer. It creates a new bitmap and bit in bitmap is set if the corresponding bit in bitmap buffer is set.
- Library File:
- ClUtil
- See Also
- clBitmap2BufferGet()
ClRcT clBitmapBufferBitsCopy |
( |
CL_IN ClUint32T |
listLen, |
|
|
CL_IN ClUint8T * |
pPositionList, |
|
|
CL_IN ClBitmapHandleT |
hBitmap |
|
) |
| |
Set the bitmap bits corresponding to the bits in buffer.
- Header File:
- clBitmapApi.h
- Parameters
-
listLen | (in) This parameter contains the length buffer in bytes. |
ppPositionList | (in) This parameter contains the buffer |
phBitmap | (in) It contains already created bitmap handle. |
- Return values
-
CL_OK | The function executed successfully. |
CL_ERR_NULL_POINTER | On passing any of the pointer parameter as NULL. |
- Description:
- This function is used to set the corresponding bits of an already created bitmap. Corresponding to each set bit in the buffer, the bitmap bit is set, but other bits of bitmap remain unchanged.
- Library File:
- ClUtil
- See Also
- clBitmapBuffer2BitmapGet()
ClRcT clBitmapCreate |
( |
CL_OUT ClBitmapHandleT * |
phBitmap, |
|
|
CL_IN ClUint32T |
bitNum |
|
) |
| |
Create a bitmap.
- Header File:
- clBitmapApi.h
- Parameters
-
phBitmap | (out) This parameter is pointer to the bitmap handle. This handle is used in subsequent calls to query bitmap information and to perform operations on the bitmap. |
bitNum | (in) The length (number of bits) of bitmap. Since bit number starts from index 0, passing bitnum value as 0 is valid. |
- Return values
-
CL_OK | The function executed successfully, the returned handle is valid. |
CL_ERR_NULL_POINTER | On passing null pointer in phBitmap. |
CL_ERR_NO_MEMORY | Memory allocation failure. |
- Note
- Returned error is a combination of the component id and error code. Use
CL_GET_ERROR_CODE(RET_CODE)
defined in clCommonErrors.h to get the error code.
- Description:
- This function is used to create a Bitmap of specified length. Initially all the bits of Bitmap are set to zero. Bitmap bit number starts from index 0.
- Library File:
- ClUtil
- See Also
- clBitmapDestroy()
ClRcT clBitmapDestroy |
( |
CL_IN ClBitmapHandleT |
hBitmap | ) |
|
Destroy a bitmap.
- Header File:
- clBitmapApi.h
- Parameters
-
hBitmap | (in) This parameter is bitmap handle. |
- Return values
-
CL_OK | The function executed successfully. |
CL_ERR_INVALID_HANDLE | On passing invalid bitmap handle. |
- Description:
- This function is used to destroy an already created bitmap. This basically frees up the resources allocated to the bitmap.
- Library File:
- ClUtil
- See Also
- clBitmapCreate()
ClInt32T clBitmapIsBitSet |
( |
CL_IN ClBitmapHandleT |
hBitmap, |
|
|
CL_IN ClUint32T |
bitNum, |
|
|
CL_OUT ClRcT * |
pRetCode |
|
) |
| |
Find the status of a bit (Set or Clear) in a bitmap.
- Header File:
- clBitmapApi.h
- Parameters
-
hBitmap | (in) This parameter is bitmap handle. |
bitNum | (in) The bit number whose status is to be checked. |
pRetCode | (out) This parameter contains the return code. It may have following values:
- CL_OK On success.
- CL_ERR_INVALID_HANDLE On passing invalid bitmap handle.
- CL_ERR_INVALID_PARAMETER On passing invalid bitnum (bit number greater than the length of the bitmap).
|
- Return values
-
CL_BM_BIT_UNDEF | On passing invalid bit number. |
CL_BM_BIT_CLEAR | If specified bit is clear (0). |
CL_BM_BIT_SET | If specified bit is set (1). |
- Description:
- This function is used to find the status of specified bit. If the specified bit number is greater than the length of the bitmap then error is returned.
- Library File:
- ClUtil
- See Also
- clBitmapNumBitsSet(), clBitmapLen()
ClUint32T clBitmapLen |
( |
CL_IN ClBitmapHandleT |
hBitmap | ) |
|
Get the length of a bitmap.
- Header File:
- clBitmapApi.h
- Parameters
-
hBitmap | (in) This parameter is bitmap handle. |
- Return values
-
0 | On passing invalid handle. |
len | length of the bitmap on success. |
- Description:
- This function is used to find the length of the bitmap. It returns 0 on failure.
- Library File:
- ClUtil
- See Also
- clBitmapIsBitSet(), clBitmapNumBitsSet()
ClRcT clBitmapNextClearBitSetNGet |
( |
CL_IN ClBitmapHandleT |
hBitmap, |
|
|
CL_IN ClUint32T |
length, |
|
|
CL_OUT ClUint32T * |
pBitSet |
|
) |
| |
Set the next clear bit and get that bit number.
- Header File:
- clBitmapApi.h
- Parameters
-
hBitmap | (in) This parameter is bitmap handle. |
length | (in) This parameter is length of bitmap. |
pBitSet | (out) On success this parameter is set to the bit number which this function sets. |
- Return values
-
CL_OK | The function executed successfully. |
CL_ERR_INVALID_HANDLE | On passing invalid bitmap handle. |
CL_ERR_NULL_POINTER | On passing pBitSet(parameter) as NULL. |
- Description:
- This function is used to set the next clear bit of the bitmap i.e. the bit next to the last set bit. It sets the value of pBitSet parameter to this bit number on success.
- Library File:
- ClUtil
- See Also
- clBitmapBitSet()
ClRcT clBitmapNumBitsSet |
( |
CL_IN ClBitmapHandleT |
hBitmap, |
|
|
CL_OUT ClUint32T * |
pNumBits |
|
) |
| |
Number of bits set in a bitmap.
- Header File:
- clBitmapApi.h
- Parameters
-
hBitmap | (in) This parameter is bitmap handle. |
pNumBits | (out) On success this parameter is set to the number of bits set in the bitmap. |
- Return values
-
CL_OK | The function executed successfully. |
CL_ERR_INVALID_HANDLE | On passing invalid bitmap handle. |
- Description:
- This function is used to find the number of bits set in the bitmap.
- Library File:
- ClUtil
- See Also
- clBitmapIsBitSet(), clBitmapLen()
ClRcT clBitmapPositionList2BitmapGet |
( |
CL_IN ClUint32T |
listLen, |
|
|
CL_IN ClUint32T * |
pPositionList, |
|
|
CL_OUT ClBitmapHandleT * |
phBitmap |
|
) |
| |
Get the bitmap corresponding to a bitmap position list.
- Header File:
- clBitmapApi.h
- Parameters
-
listLen | (in) This parameter contains the length of position list. |
ppPositionList | (in) This parameter contains the bitmap position list |
phBitmap | (out) On success it contains pointer to the newly created bitmap handle. |
- Return values
-
CL_OK | The function executed successfully. |
CL_ERR_NULL_POINTER | On passing any of the pointer parameter as NULL. |
- Description:
- This function is used to get the bitmap corresponding to a bitmap position list. It creates a new bitmap and bit in bitmap is set according to the values of the list elements.
- Library File:
- ClUtil
- See Also
- clBitmap2PositionListGet()
Perform locked walk on a bitmap.
- Header File:
- clBitmapApi.h
- Parameters
-
hBitmap | (in) This parameter is bitmap handle. |
fpUserSetBitWalkCb | (in) Pointer to the function which would be called for each set bit (1) of bitmap. |
pCookie | (in) Cookie information to be passed in the callback function. |
- Return values
-
CL_OK | The function executed successfully. |
CL_ERR_INVALID_HANDLE | On passing invalid bitmap handle. |
CL_ERR_NULL_POINTER | On passing NULL function pointer |
- Description:
- This function is used to perform locked walk on the bitmap. It calls the registered callback function for every set bit of bitmap, passing the bit number and the cookie information along with it. This walk is locked in the sense that the lock on bitmap is released only when it completes the walk i.e. no other thread/process is allowed to perform any operation on the bitmap during the walk period.
- Library File:
- ClUtil
- See Also
- clBitmapWalkUnlocked()
Perform unlocked walk on a bitmap.
- Header File:
- clBitmapApi.h
- Parameters
-
hBitmap | (in) This parameter is bitmap handle. |
fpUserSetBitWalkCb | (in) Pointer to the function which would be called for each set bit (1) of bitmap. |
pCookie | (in) Cookie information to be passed in the callback function. |
- Return values
-
CL_OK | The function executed successfully. |
CL_ERR_INVALID_HANDLE | On passing invalid bitmap handle. |
CL_ERR_NULL_POINTER | On passing NULL function pointer |
- Description:
- This function is used to perform unlocked walk on the bitmap. It calls the registered callback function for every set bit of bitmap, passing the bit number and the cookie information along with it. This walk is unlocked in the sense that the lock on bitmap is released while executing the callback function i.e. other threads/processes are allowed to perform any operation on the bitmap during the callback execution period. After execution of the callback, it again gets the lock on bitmap to find the next set bit and then it releases the lock during callback execution. This continues till callback is executed for every set bit in the bitmap.
- Library File:
- ClUtil
- See Also
- clBitmapWalk()