Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
okll00
rt-thread
提交
43221080
R
rt-thread
项目概览
okll00
/
rt-thread
与 Fork 源项目一致
Fork自
RT-Thread / rt-thread
通知
5
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
R
rt-thread
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
43221080
编写于
10月 31, 2018
作者:
B
Bernard Xiong
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
[Kernel] Fix the data type issue in kservice.c
上级
484afe9d
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
12 addition
and
13 deletion
+12
-13
src/kservice.c
src/kservice.c
+12
-13
未找到文件。
src/kservice.c
浏览文件 @
43221080
...
...
@@ -133,8 +133,8 @@ void *rt_memset(void *s, int c, rt_ubase_t count)
return
s
;
#else
#define LBLOCKSIZE (sizeof(
rt_int32_t
))
#define UNALIGNED(X) ((
rt_int32_t
)X & (LBLOCKSIZE - 1))
#define LBLOCKSIZE (sizeof(
long
))
#define UNALIGNED(X) ((
long
)X & (LBLOCKSIZE - 1))
#define TOO_SMALL(LEN) ((LEN) < LBLOCKSIZE)
int
i
;
...
...
@@ -226,11 +226,10 @@ void *rt_memcpy(void *dst, const void *src, rt_ubase_t count)
return
dst
;
#else
#define UNALIGNED(X, Y) \
(((rt_int32_t)X & (sizeof(rt_int32_t) - 1)) | \
((rt_int32_t)Y & (sizeof(rt_int32_t) - 1)))
#define BIGBLOCKSIZE (sizeof(rt_int32_t) << 2)
#define LITTLEBLOCKSIZE (sizeof(rt_int32_t))
#define UNALIGNED(X, Y) \
(((long)X & (sizeof (long) - 1)) | ((long)Y & (sizeof (long) - 1)))
#define BIGBLOCKSIZE (sizeof (long) << 2)
#define LITTLEBLOCKSIZE (sizeof (long))
#define TOO_SMALL(LEN) ((LEN) < BIGBLOCKSIZE)
char
*
dst_ptr
=
(
char
*
)
dst
;
...
...
@@ -542,20 +541,20 @@ RTM_EXPORT(rt_show_version);
/* private function */
#define isdigit(c) ((unsigned)((c) - '0') < 10)
rt_inline
rt_int32_t
divide
(
rt_int32_t
*
n
,
rt_int32_
t
base
)
rt_inline
int
divide
(
long
*
n
,
in
t
base
)
{
rt_int32_
t
res
;
in
t
res
;
/* optimized for processor which does not support divide instructions. */
if
(
base
==
10
)
{
res
=
(
(
rt_uint32_t
)
*
n
)
%
10U
;
*
n
=
(
(
rt_uint32_t
)
*
n
)
/
10U
;
res
=
(
int
)(((
unsigned
long
)
*
n
)
%
10U
)
;
*
n
=
(
long
)(((
unsigned
long
)
*
n
)
/
10U
)
;
}
else
{
res
=
(
(
rt_uint32_t
)
*
n
)
%
16U
;
*
n
=
(
(
rt_uint32_t
)
*
n
)
/
16U
;
res
=
(
int
)(((
unsigned
long
)
*
n
)
%
16U
)
;
*
n
=
(
long
)(((
unsigned
long
)
*
n
)
/
16U
)
;
}
return
res
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录