commit
9b364500ad
|
@ -350,35 +350,14 @@ static inline void SH_ListHeadInsertList(SH_List *oldList, SH_List *newList)
|
||||||
* <li>None.</li>
|
* <li>None.</li>
|
||||||
* </ul>
|
* </ul>
|
||||||
*
|
*
|
||||||
* @param type [IN] Structure name.
|
* @param type [IN] Structure name.
|
||||||
* @param field [IN] Name of the field of which the offset is to be measured.
|
* @param member [IN] Name of the member of which the offset is to be measured.
|
||||||
*
|
*
|
||||||
* @retval Offset of the field to the structure address.
|
* @retval Offset of the field to the structure address.
|
||||||
* @par Dependency:
|
* @par Dependency:
|
||||||
* <ul><li>shell_list.h: the header file that contains the API declaration.</li></ul>
|
* <ul><li>shell_list.h: the header file that contains the API declaration.</li></ul>
|
||||||
* @see
|
* @see
|
||||||
*/
|
*/
|
||||||
#define OFFSET_OF_FIELD(type, field) ((uintptr_t)&((type *)0)->field)
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @ingroup shell_list
|
|
||||||
* @brief Obtain the pointer to a doubly linked list in a structure.
|
|
||||||
*
|
|
||||||
* @par Description:
|
|
||||||
* This API is used to obtain the pointer to a doubly linked list in a structure.
|
|
||||||
* @attention
|
|
||||||
* <ul>
|
|
||||||
* <li>None.</li>
|
|
||||||
* </ul>
|
|
||||||
*
|
|
||||||
* @param type [IN] Structure name.
|
|
||||||
* @param member [IN] Member name of the doubly linked list in the structure.
|
|
||||||
*
|
|
||||||
* @retval Pointer to the doubly linked list in the structure.
|
|
||||||
* @par Dependency:
|
|
||||||
* <ul><li>shell_list.h: the header file that contains the API declaration.</li></ul>
|
|
||||||
* @see
|
|
||||||
*/
|
|
||||||
#define LOS_OFF_SET_OF(type, member) ((uintptr_t)&((type *)0)->member)
|
#define LOS_OFF_SET_OF(type, member) ((uintptr_t)&((type *)0)->member)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -104,7 +104,7 @@ STATIC VOID SortQueueIndexArray(UINT32 *indexArray, UINT32 count)
|
||||||
queueSortParam.buf = (CHAR *)g_queueDebugArray;
|
queueSortParam.buf = (CHAR *)g_queueDebugArray;
|
||||||
queueSortParam.ipcDebugCBSize = sizeof(QueueDebugCB);
|
queueSortParam.ipcDebugCBSize = sizeof(QueueDebugCB);
|
||||||
queueSortParam.ipcDebugCBCnt = LOSCFG_BASE_IPC_SEM_LIMIT;
|
queueSortParam.ipcDebugCBCnt = LOSCFG_BASE_IPC_SEM_LIMIT;
|
||||||
queueSortParam.sortElemOff = OFFSET_OF_FIELD(QueueDebugCB, lastAccessTime);
|
queueSortParam.sortElemOff = LOS_OFF_SET_OF(QueueDebugCB, lastAccessTime);
|
||||||
|
|
||||||
if (count > 0) {
|
if (count > 0) {
|
||||||
SCHEDULER_LOCK(intSave);
|
SCHEDULER_LOCK(intSave);
|
||||||
|
|
|
@ -129,7 +129,7 @@ STATIC VOID OsSemSort(UINT32 *semIndexArray, UINT32 usedCount)
|
||||||
semSortParam.buf = (CHAR *)g_semDebugArray;
|
semSortParam.buf = (CHAR *)g_semDebugArray;
|
||||||
semSortParam.ipcDebugCBSize = sizeof(SemDebugCB);
|
semSortParam.ipcDebugCBSize = sizeof(SemDebugCB);
|
||||||
semSortParam.ipcDebugCBCnt = LOSCFG_BASE_IPC_SEM_LIMIT;
|
semSortParam.ipcDebugCBCnt = LOSCFG_BASE_IPC_SEM_LIMIT;
|
||||||
semSortParam.sortElemOff = OFFSET_OF_FIELD(SemDebugCB, lastAccessTime);
|
semSortParam.sortElemOff = LOS_OFF_SET_OF(SemDebugCB, lastAccessTime);
|
||||||
|
|
||||||
/* It will Print out ALL the Used Semaphore List. */
|
/* It will Print out ALL the Used Semaphore List. */
|
||||||
PRINTK("Used Semaphore List: \n");
|
PRINTK("Used Semaphore List: \n");
|
||||||
|
|
|
@ -384,35 +384,14 @@ LITE_OS_SEC_ALW_INLINE STATIC INLINE VOID LOS_ListHeadInsertList(LOS_DL_LIST *ol
|
||||||
* <li>None.</li>
|
* <li>None.</li>
|
||||||
* </ul>
|
* </ul>
|
||||||
*
|
*
|
||||||
* @param type [IN] Structure name.
|
* @param type [IN] Structure name.
|
||||||
* @param field [IN] Name of the field of which the offset is to be measured.
|
* @param member [IN] Name of the member of which the offset is to be measured.
|
||||||
*
|
*
|
||||||
* @retval Offset of the field to the structure address.
|
* @retval Offset of the field to the structure address.
|
||||||
* @par Dependency:
|
* @par Dependency:
|
||||||
* <ul><li>los_list.h: the header file that contains the API declaration.</li></ul>
|
* <ul><li>los_list.h: the header file that contains the API declaration.</li></ul>
|
||||||
* @see
|
* @see
|
||||||
*/
|
*/
|
||||||
#define OFFSET_OF_FIELD(type, field) ((UINTPTR)&((type *)0)->field)
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @ingroup los_list
|
|
||||||
* @brief Obtain the pointer to a doubly linked list in a structure.
|
|
||||||
*
|
|
||||||
* @par Description:
|
|
||||||
* This API is used to obtain the pointer to a doubly linked list in a structure.
|
|
||||||
* @attention
|
|
||||||
* <ul>
|
|
||||||
* <li>None.</li>
|
|
||||||
* </ul>
|
|
||||||
*
|
|
||||||
* @param type [IN] Structure name.
|
|
||||||
* @param member [IN] Member name of the doubly linked list in the structure.
|
|
||||||
*
|
|
||||||
* @retval Pointer to the doubly linked list in the structure.
|
|
||||||
* @par Dependency:
|
|
||||||
* <ul><li>los_list.h: the header file that contains the API declaration.</li></ul>
|
|
||||||
* @see
|
|
||||||
*/
|
|
||||||
#define LOS_OFF_SET_OF(type, member) ((UINTPTR)&((type *)0)->member)
|
#define LOS_OFF_SET_OF(type, member) ((UINTPTR)&((type *)0)->member)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in New Issue