Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Kernel Liteos A
提交
9b4129c9
K
Kernel Liteos A
项目概览
OpenHarmony
/
Kernel Liteos A
1 年多 前同步成功
通知
460
Star
414
Fork
55
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
4
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
K
Kernel Liteos A
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
4
Issue
4
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
9b4129c9
编写于
5月 19, 2021
作者:
Y
YOUR_NAME
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Remove redundant macro definition(OFFSET_OF_FIELD)
Close #I3QMN1 Change-Id: I0ddd0c4474f5f6b5a2b1dd6608d642167b5548e6
上级
806ce4eb
变更
4
显示空白变更内容
内联
并排
Showing
4 changed file
with
6 addition
and
48 deletion
+6
-48
apps/shell/include/shell_list.h
apps/shell/include/shell_list.h
+2
-23
kernel/base/ipc/los_queue_debug.c
kernel/base/ipc/los_queue_debug.c
+1
-1
kernel/base/ipc/los_sem_debug.c
kernel/base/ipc/los_sem_debug.c
+1
-1
kernel/include/los_list.h
kernel/include/los_list.h
+2
-23
未找到文件。
apps/shell/include/shell_list.h
浏览文件 @
9b4129c9
...
...
@@ -351,34 +351,13 @@ static inline void SH_ListHeadInsertList(SH_List *oldList, SH_List *newList)
* </ul>
*
* @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.
* @par Dependency:
* <ul><li>shell_list.h: the header file that contains the API declaration.</li></ul>
* @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)
/**
...
...
kernel/base/ipc/los_queue_debug.c
浏览文件 @
9b4129c9
...
...
@@ -104,7 +104,7 @@ STATIC VOID SortQueueIndexArray(UINT32 *indexArray, UINT32 count)
queueSortParam
.
buf
=
(
CHAR
*
)
g_queueDebugArray
;
queueSortParam
.
ipcDebugCBSize
=
sizeof
(
QueueDebugCB
);
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
)
{
SCHEDULER_LOCK
(
intSave
);
...
...
kernel/base/ipc/los_sem_debug.c
浏览文件 @
9b4129c9
...
...
@@ -129,7 +129,7 @@ STATIC VOID OsSemSort(UINT32 *semIndexArray, UINT32 usedCount)
semSortParam
.
buf
=
(
CHAR
*
)
g_semDebugArray
;
semSortParam
.
ipcDebugCBSize
=
sizeof
(
SemDebugCB
);
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. */
PRINTK
(
"Used Semaphore List:
\n
"
);
...
...
kernel/include/los_list.h
浏览文件 @
9b4129c9
...
...
@@ -385,34 +385,13 @@ LITE_OS_SEC_ALW_INLINE STATIC INLINE VOID LOS_ListHeadInsertList(LOS_DL_LIST *ol
* </ul>
*
* @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.
* @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)
/**
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录