summaryrefslogtreecommitdiff
path: root/src/thread.c
diff options
context:
space:
mode:
authorxuzhuoyi <[email protected]>2018-11-16 20:09:46 +0800
committerxuzhuoyi <[email protected]>2018-11-16 20:09:46 +0800
commit37db67d94a269e1a9893d076ab2bb6b9883cfa8c (patch)
treefaaea1c497b8b50e638f768ed6fcc4ec83e6a90f /src/thread.c
parent305307c90c8723dcdb79663f65a8933b5cb1b934 (diff)
parent63a6f6c4d2540b003296594c4b916cc1ba8d0b16 (diff)
Merge remote-tracking branch 'upstream/master'
# Conflicts: # src/thread.c
Diffstat (limited to 'src/thread.c')
-rw-r--r--src/thread.c24
1 files changed, 3 insertions, 21 deletions
diff --git a/src/thread.c b/src/thread.c
index 49e004e5cc..687852e92e 100644
--- a/src/thread.c
+++ b/src/thread.c
@@ -1,21 +1,7 @@
/*
- * File : thread.c
- * This file is part of RT-Thread RTOS
- * COPYRIGHT (C) 2006 - 2012, RT-Thread Development Team
+ * Copyright (c) 2006-2018, RT-Thread Development Team
*
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program; if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ * SPDX-License-Identifier: Apache-2.0
*
* Change Logs:
* Date Author Notes
@@ -150,7 +136,7 @@ static rt_err_t _rt_thread_init(struct rt_thread *thread,
/* init thread stack */
rt_memset(thread->stack_addr, '#', thread->stack_size);
-#ifdef RT_STACK_UPWARD_GROW
+#ifdef ARCH_CPU_STACK_GROWS_UPWARD
thread->sp = (void *)rt_hw_stack_init(thread->entry, thread->parameter,
(void *)((char *)thread->stack_addr),
(void *)rt_thread_exit);
@@ -191,10 +177,6 @@ static rt_err_t _rt_thread_init(struct rt_thread *thread,
0,
RT_TIMER_FLAG_ONE_SHOT);
-#ifdef RT_USING_MODULE
- thread->module_id = RT_NULL;
-#endif
-
/* initialize signal */
#ifdef RT_USING_SIGNALS
thread->sig_mask = 0x00;