summaryrefslogtreecommitdiff
path: root/components/thread
diff options
context:
space:
mode:
authorqiuyiuestc <[email protected]>2010-04-12 17:37:37 +0000
committerqiuyiuestc <[email protected]>2010-04-12 17:37:37 +0000
commitcbfb87fac1020380eca3b15b32ea738820059007 (patch)
tree23522eed21d5abc36ff4ff9fcbf69806cc13e627 /components/thread
parentadcbe9d53fbd9753a2f3037569e3d2db8876d0d8 (diff)
add module feature
git-svn-id: https://rt-thread.googlecode.com/svn/trunk@614 bbd45198-f89e-11dd-88c7-29a3b14d5316
Diffstat (limited to 'components/thread')
-rw-r--r--components/thread/mk.bat3
-rw-r--r--components/thread/module_thread_dynamic.c6
2 files changed, 7 insertions, 2 deletions
diff --git a/components/thread/mk.bat b/components/thread/mk.bat
new file mode 100644
index 0000000000..2eaedccc6f
--- /dev/null
+++ b/components/thread/mk.bat
@@ -0,0 +1,3 @@
+set PATH="E:\Program Files\CodeSourcery\Sourcery G++ Lite\bin";%PATH%
+arm-none-eabi-gcc -c module_thread_dynamic.c -o module_thread_dynamic.o -DRT_MODULE "-I..\..\include" "-I..\..\bsp\mini2440"
+arm-none-eabi-gcc -o dynamic.mo -r -d -e rtm_main -nostdlib module_thread_dynamic.o \ No newline at end of file
diff --git a/components/thread/module_thread_dynamic.c b/components/thread/module_thread_dynamic.c
index 7a5d3238ce..d4ac0f6716 100644
--- a/components/thread/module_thread_dynamic.c
+++ b/components/thread/module_thread_dynamic.c
@@ -1,5 +1,9 @@
#include <rtthread.h>
+#define THREAD_PRIORITY 25
+#define THREAD_STACK_SIZE 512
+#define THREAD_TIMESLICE 5
+
static void thread_entry(void* parameter)
{
rt_kprintf("thread dynamicly created ok\n");
@@ -16,8 +20,6 @@ int rtm_main()
THREAD_STACK_SIZE, THREAD_PRIORITY, THREAD_TIMESLICE);
if (tid != RT_NULL)
rt_thread_startup(tid);
- else
- tc_stat(TC_STAT_END | TC_STAT_FAILED);
return 0;
} \ No newline at end of file