!252 删除冗余宏定义OFFSET_OF_FIELD

Merge pull request !252 from JerryH/list
This commit is contained in:
openharmony_ci
2021-05-21 09:54:18 +08:00
committed by Gitee
4 changed files with 6 additions and 48 deletions

View File

@@ -384,35 +384,14 @@ LITE_OS_SEC_ALW_INLINE STATIC INLINE VOID LOS_ListHeadInsertList(LOS_DL_LIST *ol
* <li>None.</li>
* </ul>
*
* @param type [IN] Structure name.
* @param field [IN] Name of the field of which the offset is to be measured.
* @param type [IN] Structure name.
* @param member [IN] Name of the member of which the offset is to be measured.
*
* @retval Offset of the field to the structure address.
* @par Dependency:
* <ul><li>los_list.h: the header file that contains the API declaration.</li></ul>
* @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)
/**