From efe4523132169a4f28b84b1820a1a71d35118965 Mon Sep 17 00:00:00 2001 From: Bernard Xiong Date: Thu, 30 Aug 2018 20:27:45 +0800 Subject: [Kernel] move module tolibc/libdl. --- src/thread.c | 4 ---- 1 file changed, 4 deletions(-) (limited to 'src/thread.c') diff --git a/src/thread.c b/src/thread.c index b3d91b30d0..7febf32082 100644 --- a/src/thread.c +++ b/src/thread.c @@ -185,10 +185,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; -- cgit v1.3.1 From 41f7f2c28411472cf99cdedf0abaaab823ba185f Mon Sep 17 00:00:00 2001 From: Bernard Xiong Date: Fri, 14 Sep 2018 22:37:43 +0800 Subject: [Kernel] Update to Apache License v2.0 Update license for RT-Thread kernel. --- include/libc/libc_dirent.h | 6 ++++++ include/libc/libc_errno.h | 22 ++++++---------------- include/libc/libc_fcntl.h | 22 ++++++---------------- include/libc/libc_fdset.h | 22 ++++++---------------- include/libc/libc_ioctl.h | 22 ++++++---------------- include/libc/libc_signal.h | 22 ++++++---------------- include/libc/libc_stat.h | 6 ++++++ include/rtdbg.h | 22 ++++++---------------- include/rtdebug.h | 22 ++++++---------------- include/rtdef.h | 23 +++++++---------------- include/rthw.h | 22 ++++++---------------- include/rtlibc.h | 22 ++++++---------------- include/rtm.h | 22 ++++++---------------- include/rtservice.h | 22 ++++++---------------- include/rtthread.h | 22 ++++++---------------- src/clock.c | 21 ++++++--------------- src/components.c | 22 ++++++---------------- src/device.c | 22 ++++++---------------- src/idle.c | 22 ++++++---------------- src/ipc.c | 22 ++++++---------------- src/irq.c | 22 ++++++---------------- src/kservice.c | 22 ++++++---------------- src/mem.c | 22 ++++++---------------- src/memheap.c | 22 ++++++---------------- src/mempool.c | 22 ++++++---------------- src/object.c | 22 ++++++---------------- src/scheduler.c | 22 ++++++---------------- src/signal.c | 22 ++++++---------------- src/slab.c | 22 ++++++---------------- src/thread.c | 22 ++++++---------------- src/timer.c | 22 ++++++---------------- 31 files changed, 187 insertions(+), 463 deletions(-) (limited to 'src/thread.c') diff --git a/include/libc/libc_dirent.h b/include/libc/libc_dirent.h index 5bcbc32478..c3a19878ec 100644 --- a/include/libc/libc_dirent.h +++ b/include/libc/libc_dirent.h @@ -1,3 +1,9 @@ +/* + * Copyright (c) 2006-2018, RT-Thread Development Team + * + * SPDX-License-Identifier: Apache-2.0 + */ + #ifndef LIBC_DIRENT_H__ #define LIBC_DIRENT_H__ diff --git a/include/libc/libc_errno.h b/include/libc/libc_errno.h index b4f4410595..82ae8cf943 100644 --- a/include/libc/libc_errno.h +++ b/include/libc/libc_errno.h @@ -1,21 +1,11 @@ /* - * File : libc_errno.h - * This file is part of RT-Thread RTOS - * COPYRIGHT (C) 2017, 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. + * Copyright (c) 2006-2018, RT-Thread Development Team * - * 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 + */ + +/* + * File : libc_errno.h * * Change Logs: * Date Author Notes diff --git a/include/libc/libc_fcntl.h b/include/libc/libc_fcntl.h index 7c5a075a97..1b7c69b1f4 100644 --- a/include/libc/libc_fcntl.h +++ b/include/libc/libc_fcntl.h @@ -1,21 +1,11 @@ /* - * File : libc_fcntl.h - * This file is part of RT-Thread RTOS - * COPYRIGHT (C) 2017 - 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. + * Copyright (c) 2006-2018, RT-Thread Development Team * - * 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 + */ + +/* + * File : libc_fcntl.h * * Change Logs: * Date Author Notes diff --git a/include/libc/libc_fdset.h b/include/libc/libc_fdset.h index 74c4ba1cb2..ecd965cd22 100644 --- a/include/libc/libc_fdset.h +++ b/include/libc/libc_fdset.h @@ -1,21 +1,11 @@ /* - * File : libc_errno.h - * This file is part of RT-Thread RTOS - * COPYRIGHT (C) 2017, 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. + * Copyright (c) 2006-2018, RT-Thread Development Team * - * 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 + */ + +/* + * File : libc_errno.h * * Change Logs: * Date Author Notes diff --git a/include/libc/libc_ioctl.h b/include/libc/libc_ioctl.h index b61866a524..ef5a5257a8 100644 --- a/include/libc/libc_ioctl.h +++ b/include/libc/libc_ioctl.h @@ -1,21 +1,11 @@ /* - * File : libc_ioctl.h - * This file is part of RT-Thread RTOS - * COPYRIGHT (C) 2017, 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. + * Copyright (c) 2006-2018, RT-Thread Development Team * - * 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 + */ + +/* + * File : libc_ioctl.h * * Change Logs: * Date Author Notes diff --git a/include/libc/libc_signal.h b/include/libc/libc_signal.h index d3050bfb54..5db43eb35e 100644 --- a/include/libc/libc_signal.h +++ b/include/libc/libc_signal.h @@ -1,21 +1,11 @@ /* - * File : libc_signal.h - * This file is part of RT-Thread RTOS - * COPYRIGHT (C) 2017, 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. + * Copyright (c) 2006-2018, RT-Thread Development Team * - * 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 + */ + +/* + * File : libc_signal.h * * Change Logs: * Date Author Notes diff --git a/include/libc/libc_stat.h b/include/libc/libc_stat.h index 26752393db..9079d1ef15 100644 --- a/include/libc/libc_stat.h +++ b/include/libc/libc_stat.h @@ -1,3 +1,9 @@ +/* + * Copyright (c) 2006-2018, RT-Thread Development Team + * + * SPDX-License-Identifier: Apache-2.0 + */ + #ifndef LIBC_STAT_H__ #define LIBC_STAT_H__ diff --git a/include/rtdbg.h b/include/rtdbg.h index 911a0d8fc9..da4eb48303 100644 --- a/include/rtdbg.h +++ b/include/rtdbg.h @@ -1,21 +1,11 @@ /* - * File : rtdbg.h - * This file is part of RT-Thread RTOS - * COPYRIGHT (C) 2006 - 2016, 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. + * Copyright (c) 2006-2018, RT-Thread Development Team * - * 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 + */ + +/* + * File : rtdbg.h * * Change Logs: * Date Author Notes diff --git a/include/rtdebug.h b/include/rtdebug.h index e403d51e06..48f8d2392a 100644 --- a/include/rtdebug.h +++ b/include/rtdebug.h @@ -1,21 +1,11 @@ /* - * File : rtdebug.h - * This file is part of RT-Thread RTOS - * 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. + * Copyright (c) 2006-2018, RT-Thread Development Team * - * 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 + */ + +/* + * File : rtdebug.h */ #ifndef __RTDEBUG_H__ diff --git a/include/rtdef.h b/include/rtdef.h index 03871d1fcc..9379a7db44 100644 --- a/include/rtdef.h +++ b/include/rtdef.h @@ -1,21 +1,11 @@ /* - * File : rtdef.h - * This file is part of RT-Thread RTOS - * 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. + * Copyright (c) 2006-2018, RT-Thread Development Team * - * 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 + */ + +/* + * File : rtdef.h * * Change Logs: * Date Author Notes @@ -37,6 +27,7 @@ * 2018-04-25 Bernard change version number to v3.0.4 * 2018-05-31 Bernard change version number to v3.1.0 * 2018-09-04 Bernard change version number to v3.1.1 + * 2018-09-14 Bernard apply Apache License v2.0 to RT-Thread Kernel */ #ifndef __RT_DEF_H__ diff --git a/include/rthw.h b/include/rthw.h index d517228083..8473854538 100644 --- a/include/rthw.h +++ b/include/rthw.h @@ -1,21 +1,11 @@ /* - * File : rthw.h - * This file is part of RT-Thread RTOS - * COPYRIGHT (C) 2006 - 2012, 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. + * Copyright (c) 2006-2018, RT-Thread Development Team * - * 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 + */ + +/* + * File : rthw.h * * Change Logs: * Date Author Notes diff --git a/include/rtlibc.h b/include/rtlibc.h index db5236edb1..385d57500e 100644 --- a/include/rtlibc.h +++ b/include/rtlibc.h @@ -1,21 +1,11 @@ /* - * File : rtlibc.h - * This file is part of RT-Thread RTOS - * COPYRIGHT (C) 2017, 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. + * Copyright (c) 2006-2018, RT-Thread Development Team * - * 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 + */ + +/* + * File : rtlibc.h * * Change Logs: * Date Author Notes diff --git a/include/rtm.h b/include/rtm.h index 05419e4420..08ad721baf 100644 --- a/include/rtm.h +++ b/include/rtm.h @@ -1,21 +1,11 @@ /* - * File : rtm.h - * This file is part of RT-Thread RTOS - * COPYRIGHT (C) 2006 - 2012, 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. + * Copyright (c) 2006-2018, RT-Thread Development Team * - * 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 + */ + +/* + * File : rtm.h */ #ifndef __RTM_H__ diff --git a/include/rtservice.h b/include/rtservice.h index 77a21d1f97..145a225ace 100644 --- a/include/rtservice.h +++ b/include/rtservice.h @@ -1,21 +1,11 @@ /* - * File : rtservice.h - * This file is part of RT-Thread RTOS - * COPYRIGHT (C) 2006 - 2012, 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. + * Copyright (c) 2006-2018, RT-Thread Development Team * - * 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 + */ + +/* + * File : rtservice.h * * Change Logs: * Date Author Notes diff --git a/include/rtthread.h b/include/rtthread.h index 4114866f6f..82d975d648 100644 --- a/include/rtthread.h +++ b/include/rtthread.h @@ -1,21 +1,11 @@ /* - * File : rtthread.h - * This file is part of RT-Thread RTOS - * COPYRIGHT (C) 2006 - 2012, 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. + * Copyright (c) 2006-2018, RT-Thread Development Team * - * 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 + */ + +/* + * File : rtthread.h * * Change Logs: * Date Author Notes diff --git a/src/clock.c b/src/clock.c index 734c0d5014..9834f0f95c 100644 --- a/src/clock.c +++ b/src/clock.c @@ -1,21 +1,12 @@ /* - * File : clock.c - * This file is part of RT-Thread RTOS - * COPYRIGHT (C) 2006 - 2012, 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. + * Copyright (c) 2006-2018, RT-Thread Development Team * - * 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. + * SPDX-License-Identifier: Apache-2.0 * - * 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. + */ + +/* + * File : clock.c * * Change Logs: * Date Author Notes diff --git a/src/components.c b/src/components.c index 818e570b3c..410b20be93 100644 --- a/src/components.c +++ b/src/components.c @@ -1,21 +1,11 @@ /* - * File : init.c - * This file is part of RT-Thread RTOS - * COPYRIGHT (C) 2012 - 2015, 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. + * Copyright (c) 2006-2018, RT-Thread Development Team * - * 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 + */ + +/* + * File : init.c * * Change Logs: * Date Author Notes diff --git a/src/device.c b/src/device.c index 0b662ae620..94f550d682 100644 --- a/src/device.c +++ b/src/device.c @@ -1,21 +1,11 @@ /* - * File : device.c - * This file is part of RT-Thread RTOS - * COPYRIGHT (C) 2006 - 2013, 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. + * Copyright (c) 2006-2018, RT-Thread Development Team * - * 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 + */ + +/* + * File : device.c * * Change Logs: * Date Author Notes diff --git a/src/idle.c b/src/idle.c index 1aca33d3e4..8a4734ab49 100644 --- a/src/idle.c +++ b/src/idle.c @@ -1,21 +1,11 @@ /* - * File : idle.c - * This file is part of RT-Thread RTOS - * COPYRIGHT (C) 2006 - 2012, 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. + * Copyright (c) 2006-2018, RT-Thread Development Team * - * 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 + */ + +/* + * File : idle.c * * Change Logs: * Date Author Notes diff --git a/src/ipc.c b/src/ipc.c index b1a5dbe402..d2a3ba766c 100644 --- a/src/ipc.c +++ b/src/ipc.c @@ -1,21 +1,11 @@ +/* + * Copyright (c) 2006-2018, RT-Thread Development Team + * + * SPDX-License-Identifier: Apache-2.0 + */ + /* * File : ipc.c - * This file is part of RT-Thread RTOS - * COPYRIGHT (C) 2006 - 2012, 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. * * Change Logs: * Date Author Notes diff --git a/src/irq.c b/src/irq.c index 9b933e3960..98a6fd3a04 100644 --- a/src/irq.c +++ b/src/irq.c @@ -1,21 +1,11 @@ /* - * File : irq.c - * This file is part of RT-Thread RTOS - * COPYRIGHT (C) 2006 - 2012, 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. + * Copyright (c) 2006-2018, RT-Thread Development Team * - * 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 + */ + +/* + * File : irq.c * * Change Logs: * Date Author Notes diff --git a/src/kservice.c b/src/kservice.c index 35444aa248..a31e5a6f93 100644 --- a/src/kservice.c +++ b/src/kservice.c @@ -1,21 +1,11 @@ /* - * File : kservice.c - * This file is part of RT-Thread RTOS - * COPYRIGHT (C) 2006 - 2012, 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. + * Copyright (c) 2006-2018, RT-Thread Development Team * - * 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 + */ + +/* + * File : kservice.c * * Change Logs: * Date Author Notes diff --git a/src/mem.c b/src/mem.c index 324a5f8f64..03e6f34eb4 100644 --- a/src/mem.c +++ b/src/mem.c @@ -1,21 +1,11 @@ /* - * File : mem.c - * This file is part of RT-Thread RTOS - * COPYRIGHT (C) 2008 - 2012, 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. + * Copyright (c) 2006-2018, RT-Thread Development Team * - * 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 + */ + +/* + * File : mem.c * * Change Logs: * Date Author Notes diff --git a/src/memheap.c b/src/memheap.c index de637f2685..946f163b64 100644 --- a/src/memheap.c +++ b/src/memheap.c @@ -1,21 +1,11 @@ /* - * File : memheap.c - * This file is part of RT-Thread RTOS - * COPYRIGHT (C) 2012, 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. + * Copyright (c) 2006-2018, RT-Thread Development Team * - * 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 + */ + +/* + * File : memheap.c * * Change Logs: * Date Author Notes diff --git a/src/mempool.c b/src/mempool.c index cd98e8c14e..e1af7d9e42 100644 --- a/src/mempool.c +++ b/src/mempool.c @@ -1,21 +1,11 @@ /* - * File : mempool.c - * This file is part of RT-Thread RTOS - * COPYRIGHT (C) 2006 - 2012, 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. + * Copyright (c) 2006-2018, RT-Thread Development Team * - * 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 + */ + +/* + * File : mempool.c * * Change Logs: * Date Author Notes diff --git a/src/object.c b/src/object.c index e9a2b99246..8dcfb2e57e 100644 --- a/src/object.c +++ b/src/object.c @@ -1,21 +1,11 @@ /* - * File : object.c - * This file is part of RT-Thread RTOS - * COPYRIGHT (C) 2006 - 2012, 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. + * Copyright (c) 2006-2018, RT-Thread Development Team * - * 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 + */ + +/* + * File : object.c * * Change Logs: * Date Author Notes diff --git a/src/scheduler.c b/src/scheduler.c index 1be1816bc2..8b5ffc9f4c 100644 --- a/src/scheduler.c +++ b/src/scheduler.c @@ -1,21 +1,11 @@ /* - * File : scheduler.c - * This file is part of RT-Thread RTOS - * COPYRIGHT (C) 2006 - 2012, 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. + * Copyright (c) 2006-2018, RT-Thread Development Team * - * 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 + */ + +/* + * File : scheduler.c * * Change Logs: * Date Author Notes diff --git a/src/signal.c b/src/signal.c index b2193957bc..6499d05a97 100644 --- a/src/signal.c +++ b/src/signal.c @@ -1,21 +1,11 @@ /* - * File : signal.c - * This file is part of RT-Thread RTOS - * COPYRIGHT (C) 2006 - 2017, 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. + * Copyright (c) 2006-2018, RT-Thread Development Team * - * 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 + */ + +/* + * File : signal.c * * Change Logs: * Date Author Notes diff --git a/src/slab.c b/src/slab.c index 16c68a2408..bf26c84cca 100644 --- a/src/slab.c +++ b/src/slab.c @@ -1,21 +1,11 @@ /* - * File : slab.c - * This file is part of RT-Thread RTOS - * COPYRIGHT (C) 2008 - 2012, 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. + * Copyright (c) 2006-2018, RT-Thread Development Team * - * 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 + */ + +/* + * File : slab.c * * Change Logs: * Date Author Notes diff --git a/src/thread.c b/src/thread.c index 7febf32082..249219b8aa 100644 --- a/src/thread.c +++ b/src/thread.c @@ -1,21 +1,11 @@ +/* + * Copyright (c) 2006-2018, RT-Thread Development Team + * + * SPDX-License-Identifier: Apache-2.0 + */ + /* * File : thread.c - * This file is part of RT-Thread RTOS - * COPYRIGHT (C) 2006 - 2012, 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. * * Change Logs: * Date Author Notes diff --git a/src/timer.c b/src/timer.c index 042826f41b..01e6211e04 100644 --- a/src/timer.c +++ b/src/timer.c @@ -1,21 +1,11 @@ /* - * File : timer.c - * This file is part of RT-Thread RTOS - * COPYRIGHT (C) 2006 - 2012, 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. + * Copyright (c) 2006-2018, RT-Thread Development Team * - * 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 + */ + +/* + * File : timer.c * * Change Logs: * Date Author Notes -- cgit v1.3.1 From ff08faf605d683a462a2bedd17a6d3ef6ad61761 Mon Sep 17 00:00:00 2001 From: Bernard Xiong Date: Tue, 25 Sep 2018 11:06:07 +0800 Subject: [Kernel] Adjust the copyright information --- libcpu/arm/cortex-m4/context_rvds.S | 12 ++++-------- src/clock.c | 5 ----- src/components.c | 4 ---- src/device.c | 4 ---- src/idle.c | 4 ---- src/ipc.c | 4 ---- src/irq.c | 4 ---- src/kservice.c | 4 ---- src/mem.c | 4 ---- src/mempool.c | 4 ---- src/object.c | 4 ---- src/scheduler.c | 4 ---- src/signal.c | 4 ---- src/thread.c | 4 ---- src/timer.c | 4 ---- 15 files changed, 4 insertions(+), 65 deletions(-) (limited to 'src/thread.c') diff --git a/libcpu/arm/cortex-m4/context_rvds.S b/libcpu/arm/cortex-m4/context_rvds.S index 6d20ab8e3e..f6d2447c5e 100644 --- a/libcpu/arm/cortex-m4/context_rvds.S +++ b/libcpu/arm/cortex-m4/context_rvds.S @@ -1,12 +1,8 @@ ;/* -; * File : context_rvds.S -; * This file is part of RT-Thread RTOS -; * COPYRIGHT (C) 2006 - 2018, RT-Thread Development Team -; * -; * The license and distribution terms for this file may be -; * found in the file LICENSE in this distribution or at -; * http://www.rt-thread.org/license/LICENSE -; * +;* Copyright (c) 2006-2018, RT-Thread Development Team +;* +;* SPDX-License-Identifier: Apache-2.0 +;* ; * Change Logs: ; * Date Author Notes ; * 2009-01-17 Bernard first version. diff --git a/src/clock.c b/src/clock.c index 9834f0f95c..651465e0a8 100644 --- a/src/clock.c +++ b/src/clock.c @@ -3,11 +3,6 @@ * * SPDX-License-Identifier: Apache-2.0 * - */ - -/* - * File : clock.c - * * Change Logs: * Date Author Notes * 2006-03-12 Bernard first version diff --git a/src/components.c b/src/components.c index 09f0680b55..679a88ef11 100644 --- a/src/components.c +++ b/src/components.c @@ -2,10 +2,6 @@ * Copyright (c) 2006-2018, RT-Thread Development Team * * SPDX-License-Identifier: Apache-2.0 - */ - -/* - * File : init.c * * Change Logs: * Date Author Notes diff --git a/src/device.c b/src/device.c index 94f550d682..51fc6176a6 100644 --- a/src/device.c +++ b/src/device.c @@ -2,10 +2,6 @@ * Copyright (c) 2006-2018, RT-Thread Development Team * * SPDX-License-Identifier: Apache-2.0 - */ - -/* - * File : device.c * * Change Logs: * Date Author Notes diff --git a/src/idle.c b/src/idle.c index 8a4734ab49..ec7d6bea6e 100644 --- a/src/idle.c +++ b/src/idle.c @@ -2,10 +2,6 @@ * Copyright (c) 2006-2018, RT-Thread Development Team * * SPDX-License-Identifier: Apache-2.0 - */ - -/* - * File : idle.c * * Change Logs: * Date Author Notes diff --git a/src/ipc.c b/src/ipc.c index d2a3ba766c..56045911a8 100644 --- a/src/ipc.c +++ b/src/ipc.c @@ -2,10 +2,6 @@ * Copyright (c) 2006-2018, RT-Thread Development Team * * SPDX-License-Identifier: Apache-2.0 - */ - -/* - * File : ipc.c * * Change Logs: * Date Author Notes diff --git a/src/irq.c b/src/irq.c index 98a6fd3a04..72d220bd92 100644 --- a/src/irq.c +++ b/src/irq.c @@ -2,10 +2,6 @@ * Copyright (c) 2006-2018, RT-Thread Development Team * * SPDX-License-Identifier: Apache-2.0 - */ - -/* - * File : irq.c * * Change Logs: * Date Author Notes diff --git a/src/kservice.c b/src/kservice.c index e10c093c70..dbc4a2fb0e 100644 --- a/src/kservice.c +++ b/src/kservice.c @@ -2,10 +2,6 @@ * Copyright (c) 2006-2018, RT-Thread Development Team * * SPDX-License-Identifier: Apache-2.0 - */ - -/* - * File : kservice.c * * Change Logs: * Date Author Notes diff --git a/src/mem.c b/src/mem.c index 03e6f34eb4..cb96ab9ee0 100644 --- a/src/mem.c +++ b/src/mem.c @@ -2,10 +2,6 @@ * Copyright (c) 2006-2018, RT-Thread Development Team * * SPDX-License-Identifier: Apache-2.0 - */ - -/* - * File : mem.c * * Change Logs: * Date Author Notes diff --git a/src/mempool.c b/src/mempool.c index e1af7d9e42..2184586aba 100644 --- a/src/mempool.c +++ b/src/mempool.c @@ -2,10 +2,6 @@ * Copyright (c) 2006-2018, RT-Thread Development Team * * SPDX-License-Identifier: Apache-2.0 - */ - -/* - * File : mempool.c * * Change Logs: * Date Author Notes diff --git a/src/object.c b/src/object.c index 8dcfb2e57e..70b9a5c04e 100644 --- a/src/object.c +++ b/src/object.c @@ -2,10 +2,6 @@ * Copyright (c) 2006-2018, RT-Thread Development Team * * SPDX-License-Identifier: Apache-2.0 - */ - -/* - * File : object.c * * Change Logs: * Date Author Notes diff --git a/src/scheduler.c b/src/scheduler.c index 8b5ffc9f4c..95b5d487df 100644 --- a/src/scheduler.c +++ b/src/scheduler.c @@ -2,10 +2,6 @@ * Copyright (c) 2006-2018, RT-Thread Development Team * * SPDX-License-Identifier: Apache-2.0 - */ - -/* - * File : scheduler.c * * Change Logs: * Date Author Notes diff --git a/src/signal.c b/src/signal.c index 6499d05a97..c783420514 100644 --- a/src/signal.c +++ b/src/signal.c @@ -2,10 +2,6 @@ * Copyright (c) 2006-2018, RT-Thread Development Team * * SPDX-License-Identifier: Apache-2.0 - */ - -/* - * File : signal.c * * Change Logs: * Date Author Notes diff --git a/src/thread.c b/src/thread.c index 249219b8aa..6d79ece54b 100644 --- a/src/thread.c +++ b/src/thread.c @@ -2,10 +2,6 @@ * Copyright (c) 2006-2018, RT-Thread Development Team * * SPDX-License-Identifier: Apache-2.0 - */ - -/* - * File : thread.c * * Change Logs: * Date Author Notes diff --git a/src/timer.c b/src/timer.c index 01e6211e04..dc489a2d0d 100644 --- a/src/timer.c +++ b/src/timer.c @@ -2,10 +2,6 @@ * Copyright (c) 2006-2018, RT-Thread Development Team * * SPDX-License-Identifier: Apache-2.0 - */ - -/* - * File : timer.c * * Change Logs: * Date Author Notes -- cgit v1.3.1 From 00a655ac1c24d3707a5af376ec756e42406cd6bb Mon Sep 17 00:00:00 2001 From: Bernard Xiong Date: Sun, 11 Nov 2018 15:56:02 +0800 Subject: [Kernel] Add ARCH_CPU_STACK_GROWS_UPWARD option --- components/finsh/cmd.c | 16 ++++++++++++++-- libcpu/Kconfig | 4 ++++ src/scheduler.c | 10 +++++++++- src/thread.c | 6 ++++++ 4 files changed, 33 insertions(+), 3 deletions(-) (limited to 'src/thread.c') diff --git a/components/finsh/cmd.c b/components/finsh/cmd.c index a97ef3caab..c66f72e650 100644 --- a/components/finsh/cmd.c +++ b/components/finsh/cmd.c @@ -101,16 +101,28 @@ static long _list_thread(struct rt_list_node *list) else if (stat == RT_THREAD_INIT) rt_kprintf(" init "); else if (stat == RT_THREAD_CLOSE) rt_kprintf(" close "); +#if defined(ARCH_CPU_STACK_GROWS_UPWARD) + ptr = (rt_uint8_t *)thread->stack_addr + thread->stack_size; + while (*ptr == '#')ptr --; + + rt_kprintf(" 0x%08x 0x%08x %02d%% 0x%08x %03d\n", + ((rt_uint32_t)thread->sp - (rt_uint32_t)thread->stack_addr), + thread->stack_size, + ((rt_uint32_t)ptr - (rt_uint32_t)thread->stack_addr) * 100 / thread->stack_size, + thread->remaining_tick, + thread->error); +#else ptr = (rt_uint8_t *)thread->stack_addr; while (*ptr == '#')ptr ++; rt_kprintf(" 0x%08x 0x%08x %02d%% 0x%08x %03d\n", - thread->stack_size + ((rt_uint32_t)thread->stack_addr - (rt_uint32_t)thread->sp), + (thread->stack_size + (rt_uint32_t)thread->stack_addr - (rt_uint32_t)thread->sp), thread->stack_size, - (thread->stack_size - ((rt_uint32_t) ptr - (rt_uint32_t) thread->stack_addr)) * 100 + (thread->stack_size + (rt_uint32_t)thread->stack_addr - (rt_uint32_t) ptr) * 100 / thread->stack_size, thread->remaining_tick, thread->error); +#endif } return 0; diff --git a/libcpu/Kconfig b/libcpu/Kconfig index 0a280d4b5c..3c80428b5d 100644 --- a/libcpu/Kconfig +++ b/libcpu/Kconfig @@ -88,3 +88,7 @@ config ARCH_IA32 config ARCH_HOST_SIMULATOR bool + +config ARCH_CPU_STACK_GROWS_UPWARD + bool + default n diff --git a/src/scheduler.c b/src/scheduler.c index 95b5d487df..0b8b54ae92 100644 --- a/src/scheduler.c +++ b/src/scheduler.c @@ -91,11 +91,19 @@ static void _rt_scheduler_stack_check(struct rt_thread *thread) level = rt_hw_interrupt_disable(); while (level); } +#if defined(ARCH_CPU_STACK_GROWS_UPWARD) + else if ((rt_uint32_t)thread->sp > ((rt_uint32_t)thread->stack_addr + thread->stack_size)) + { + rt_kprintf("warning: %s stack is close to the top of stack address.\n", + thread->name); + } +#else else if ((rt_uint32_t)thread->sp <= ((rt_uint32_t)thread->stack_addr + 32)) { - rt_kprintf("warning: %s stack is close to end of stack address.\n", + rt_kprintf("warning: %s stack is close to the bottom of stack address.\n", thread->name); } +#endif } #endif diff --git a/src/thread.c b/src/thread.c index 6d79ece54b..687852e92e 100644 --- a/src/thread.c +++ b/src/thread.c @@ -136,9 +136,15 @@ static rt_err_t _rt_thread_init(struct rt_thread *thread, /* init thread stack */ rt_memset(thread->stack_addr, '#', thread->stack_size); +#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); +#else thread->sp = (void *)rt_hw_stack_init(thread->entry, thread->parameter, (void *)((char *)thread->stack_addr + thread->stack_size - 4), (void *)rt_thread_exit); +#endif /* priority init */ RT_ASSERT(priority < RT_THREAD_PRIORITY_MAX); -- cgit v1.3.1