Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
dgr6878
rt-thread
提交
3022725f
R
rt-thread
项目概览
dgr6878
/
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,发现更多精彩内容 >>
提交
3022725f
编写于
4月 13, 2014
作者:
B
Bernard Xiong
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #262 from grissiom/misc-fix
Misc fix
上级
0c4ac4bd
5ad58a59
变更
11
隐藏空白更改
内联
并排
Showing
11 changed file
with
27 addition
and
12 deletion
+27
-12
components/dfs/src/dfs_fs.c
components/dfs/src/dfs_fs.c
+2
-0
components/finsh/finsh_token.c
components/finsh/finsh_token.c
+8
-2
components/finsh/msh.c
components/finsh/msh.c
+2
-2
components/libc/minilibc/string.c
components/libc/minilibc/string.c
+2
-2
components/pthreads/mqueue.c
components/pthreads/mqueue.c
+0
-3
components/pthreads/pthread_rwlock.c
components/pthreads/pthread_rwlock.c
+1
-1
components/pthreads/semaphore.c
components/pthreads/semaphore.c
+0
-2
examples/kernel/event_simple.c
examples/kernel/event_simple.c
+1
-0
examples/kernel/mutex_simple.c
examples/kernel/mutex_simple.c
+4
-0
examples/kernel/semaphore_buffer_worker.c
examples/kernel/semaphore_buffer_worker.c
+6
-0
examples/kernel/semaphore_producer_consumer.c
examples/kernel/semaphore_producer_consumer.c
+1
-0
未找到文件。
components/dfs/src/dfs_fs.c
浏览文件 @
3022725f
...
...
@@ -85,6 +85,8 @@ struct dfs_filesystem *dfs_filesystem_lookup(const char *path)
prefixlen
=
0
;
RT_ASSERT
(
path
);
/* lock filesystem */
dfs_lock
();
...
...
components/finsh/finsh_token.c
浏览文件 @
3022725f
...
...
@@ -508,10 +508,10 @@ static void token_proc_number(struct finsh_token* self)
*
p
=
'\0'
;
}
else
else
if
(
'0'
<=
ch
&&
ch
<=
'7'
)
{
b
=
8
;
while
(
is_digit
(
ch
)
)
while
(
'0'
<=
ch
&&
ch
<=
'7'
)
{
*
p
++
=
ch
;
ch
=
token_next_char
(
self
);
...
...
@@ -519,6 +519,12 @@ static void token_proc_number(struct finsh_token* self)
*
p
=
'\0'
;
}
else
{
/* Not a valid number */
token_prev_char
(
self
);
return
;
}
self
->
value
.
int_value
=
token_spec_number
(
buf
,
strlen
(
buf
),
b
);
self
->
current_token
=
finsh_token_type_value_int
;
...
...
components/finsh/msh.c
浏览文件 @
3022725f
...
...
@@ -358,7 +358,6 @@ void msh_auto_complete_path(char *path)
full_path
=
(
char
*
)
rt_malloc
(
256
);
if
(
full_path
==
RT_NULL
)
return
;
/* out of memory */
ptr
=
full_path
;
if
(
*
path
!=
'/'
)
{
getcwd
(
full_path
,
256
);
...
...
@@ -367,7 +366,8 @@ void msh_auto_complete_path(char *path)
}
else
*
full_path
=
'\0'
;
index
=
RT_NULL
;
ptr
=
path
;
index
=
RT_NULL
;
ptr
=
path
;
for
(;;)
{
if
(
*
ptr
==
'/'
)
index
=
ptr
+
1
;
if
(
!*
ptr
)
break
;
ptr
++
;
...
...
components/libc/minilibc/string.c
浏览文件 @
3022725f
...
...
@@ -146,10 +146,10 @@ int strncasecmp ( const char* s1, const char* s2, size_t len )
x1
=
*
s1
-
'A'
;
if
((
x1
<
26u
))
x1
+=
32
;
s1
++
;
s2
++
;
if
(
(
x2
!=
x1
)
)
if
(
x2
!=
x1
)
break
;
if
(
(
x1
==
(
unsigned
int
)
-
'A'
)
)
if
(
x1
==
(
unsigned
int
)
-
'A'
)
break
;
}
...
...
components/pthreads/mqueue.c
浏览文件 @
3022725f
...
...
@@ -119,7 +119,6 @@ mqd_t mq_open(const char *name, int oflag, ...)
{
mqd_t
mqdes
;
va_list
arg
;
mode_t
mode
;
struct
mq_attr
*
attr
=
RT_NULL
;
/* lock posix mqueue list */
...
...
@@ -129,8 +128,6 @@ mqd_t mq_open(const char *name, int oflag, ...)
if
(
oflag
&
O_CREAT
)
{
va_start
(
arg
,
oflag
);
mode
=
(
mode_t
)
va_arg
(
arg
,
unsigned
int
);
mode
=
mode
;
attr
=
(
struct
mq_attr
*
)
va_arg
(
arg
,
struct
mq_attr
*
);
va_end
(
arg
);
...
...
components/pthreads/pthread_rwlock.c
浏览文件 @
3022725f
...
...
@@ -101,7 +101,7 @@ int pthread_rwlock_destroy (pthread_rwlock_t *rwlock)
{
result
=
EBUSY
;
return
(
EBUSY
)
;
return
result
;
}
else
{
...
...
components/pthreads/semaphore.c
浏览文件 @
3022725f
...
...
@@ -224,7 +224,6 @@ sem_t *sem_open(const char *name, int oflag, ...)
{
sem_t
*
sem
;
va_list
arg
;
mode_t
mode
;
unsigned
int
value
;
sem
=
RT_NULL
;
...
...
@@ -234,7 +233,6 @@ sem_t *sem_open(const char *name, int oflag, ...)
if
(
oflag
&
O_CREAT
)
{
va_start
(
arg
,
oflag
);
mode
=
(
mode_t
)
va_arg
(
arg
,
unsigned
int
);
mode
=
mode
;
value
=
va_arg
(
arg
,
unsigned
int
);
va_end
(
arg
);
...
...
examples/kernel/event_simple.c
浏览文件 @
3022725f
...
...
@@ -7,6 +7,7 @@
* 一个线程定时发送事件 (事件5)
*/
#include <rtthread.h>
#include <time.h>
#include "tc_comm.h"
/* 指向线程控制块的指针 */
...
...
examples/kernel/mutex_simple.c
浏览文件 @
3022725f
...
...
@@ -60,6 +60,10 @@ static void thread3_entry(void* parameter)
while
(
1
)
{
result
=
rt_mutex_take
(
mutex
,
RT_WAITING_FOREVER
);
if
(
result
!=
RT_EOK
)
{
tc_stat
(
TC_STAT_END
|
TC_STAT_FAILED
);
}
result
=
rt_mutex_take
(
mutex
,
RT_WAITING_FOREVER
);
if
(
result
!=
RT_EOK
)
{
...
...
examples/kernel/semaphore_buffer_worker.c
浏览文件 @
3022725f
...
...
@@ -178,8 +178,14 @@ static void worker_entry(void* parameter)
/* 持有信号量 */
rt_sem_take
(
sem
,
RT_WAITING_FOREVER
);
/* 把数据放到环形buffer中 */
result
=
rb_put
(
&
working_rb
,
&
data_buffer
[
0
],
BUFFER_ITEM
);
if
(
result
==
RT_FALSE
)
{
rt_kprintf
(
"put error
\n
"
);
}
/* 释放信号量 */
rt_sem_release
(
sem
);
...
...
examples/kernel/semaphore_producer_consumer.c
浏览文件 @
3022725f
...
...
@@ -59,6 +59,7 @@ void consumer_thread_entry(void* parameter)
/* 第n个线程,由入口参数传进来 */
no
=
(
rt_uint32_t
)
parameter
;
sum
=
0
;
while
(
1
)
{
/* 获取一个满位 */
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录