diff options
| author | bernard.xiong <[email protected]> | 2010-03-03 09:12:08 +0000 |
|---|---|---|
| committer | bernard.xiong <[email protected]> | 2010-03-03 09:12:08 +0000 |
| commit | 54d711a9c549845698cb10b70298fae5d4afc74d (patch) | |
| tree | 51b1c55e457a6c50fb550be0a5d1e376fa8160a2 /examples/kernel/thread_priority.c | |
| parent | 51e545f575ce331a233ed199c9265649771e7cc6 (diff) | |
add more thread examples.
git-svn-id: https://rt-thread.googlecode.com/svn/trunk@459 bbd45198-f89e-11dd-88c7-29a3b14d5316
Diffstat (limited to 'examples/kernel/thread_priority.c')
| -rw-r--r-- | examples/kernel/thread_priority.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/examples/kernel/thread_priority.c b/examples/kernel/thread_priority.c index 7864a91232..4699913369 100644 --- a/examples/kernel/thread_priority.c +++ b/examples/kernel/thread_priority.c @@ -10,7 +10,7 @@ static rt_uint32_t count = 0; /*
* the priority of thread1 > the priority of thread2
*/
-void thread1_entry(void* parameter)
+static void thread1_entry(void* parameter)
{
while (1)
{
@@ -21,7 +21,7 @@ void thread1_entry(void* parameter) }
}
-void thread2_entry(void* parameter)
+static void thread2_entry(void* parameter)
{
rt_tick_t tick;
@@ -43,7 +43,7 @@ void thread2_entry(void* parameter) int thread_priority_init()
{
rt_err_t result;
-
+
result = rt_thread_init(&thread1,
"t1",
thread1_entry, RT_NULL,
@@ -73,7 +73,7 @@ static void _tc_cleanup() {
/* lock scheduler */
rt_enter_critical();
-
+
if (thread1.stat != RT_THREAD_CLOSE)
rt_thread_detach(&thread1);
if (thread2.stat != RT_THREAD_CLOSE)
|
