add RT_USING_TC in SConscript.

git-svn-id: https://rt-thread.googlecode.com/svn/trunk@1191 bbd45198-f89e-11dd-88c7-29a3b14d5316
This commit is contained in:
bernard.xiong@gmail.com 2010-12-12 23:37:14 +00:00
parent efdd4043bd
commit fdfe4f4781
2 changed files with 4 additions and 2 deletions

View File

@ -31,7 +31,8 @@ heap_malloc.c
heap_realloc.c
memp_simple.c
""")
CPPDEFINES = ['RT_USING_TC']
group = DefineGroup('examples', src, depend = [''])
group = DefineGroup('examples', src, depend = [''], CPPDEFINES = CPPDEFINES)
Return('group')

View File

@ -135,7 +135,7 @@ static rt_bool_t rb_get(struct rb* rb, rt_uint8_t *ptr, rt_uint16_t length)
static void thread_entry(void* parameter)
{
rt_bool_t result;
rt_uint8_t data_buffer[BUFFER_ITEM];
rt_uint8_t data_buffer[BUFFER_ITEM + 1];
while (1)
{
@ -145,6 +145,7 @@ static void thread_entry(void* parameter)
result = rb_get(&working_rb, &data_buffer[0], BUFFER_ITEM);
/* 释放信号量 */
rt_sem_release(sem);
data_buffer[BUFFER_ITEM] = '\0';
if (result == RT_TRUE)
{