summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoryiyue.fang <[email protected]>2013-06-26 23:25:12 +0800
committeryiyue.fang <[email protected]>2013-06-26 23:25:12 +0800
commit90ac1c9ba4ce6c23e52ec1ac04ce67968edcc739 (patch)
tree7a775de714bbd9c075b693771acbc46e0af76165
parent8ab2b287b813edc1cdbe8bba430a2593e5fc3e8a (diff)
Embedded GPLv2 license in components
-rw-r--r--components/init/components.c60
-rw-r--r--components/init/components.h16
2 files changed, 48 insertions, 28 deletions
diff --git a/components/init/components.c b/components/init/components.c
index 8fe774708e..86caf498d2 100644
--- a/components/init/components.c
+++ b/components/init/components.c
@@ -1,11 +1,21 @@
/*
* File : components.c
* This file is part of RT-Thread RTOS
- * COPYRIGHT (C) 2012, RT-Thread Development Team
+ * COPYRIGHT (C) 2012 - 2013, 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
+ * 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
@@ -19,19 +29,19 @@
static int rti_start(void)
{
- return 0;
+ return 0;
}
INIT_EXPORT(rti_start, "0");
static int rti_board_end(void)
{
- return 0;
+ return 0;
}
INIT_EXPORT(rti_board_end, "1.post");
static int rti_end(void)
{
- return 0;
+ return 0;
}
INIT_EXPORT(rti_end,"7");
@@ -39,14 +49,14 @@ INIT_EXPORT(rti_end,"7");
/* fixed for MSC_VC and x86_64 in GNU GCC */
#define NEXT_COMPONENT_FN(fn_ptr, end) fn_ptr = _next_component_fn(fn_ptr, end)
-const init_fn_t* _next_component_fn(const init_fn_t* fn, const init_fn_t* end)
+const init_fn_t *_next_component_fn(const init_fn_t *fn, const init_fn_t *end)
{
- unsigned int *ptr;
- ptr = (unsigned int*) (fn + 1);
- while ((*ptr == 0) && ((unsigned int*)ptr < (unsigned int*)end))
- ptr ++;
+ unsigned int *ptr;
+ ptr = (unsigned int*) (fn + 1);
+ while ((*ptr == 0) && ((unsigned int*)ptr < (unsigned int*)end))
+ ptr ++;
- return (const init_fn_t*)ptr;
+ return (const init_fn_t*)ptr;
}
#else
#define NEXT_COMPONENT_FN(fn_ptr, end) fn_ptr++
@@ -57,13 +67,13 @@ const init_fn_t* _next_component_fn(const init_fn_t* fn, const init_fn_t* end)
*/
void rt_components_board_init(void)
{
- const init_fn_t* fn_ptr;
+ const init_fn_t *fn_ptr;
- for (fn_ptr = &__rt_init_rti_start; fn_ptr < &__rt_init_rti_board_end; )
- {
- (*fn_ptr)();
- NEXT_COMPONENT_FN(fn_ptr, __rt_init_rti_board_end);
- }
+ for (fn_ptr = &__rt_init_rti_start; fn_ptr < &__rt_init_rti_board_end; )
+ {
+ (*fn_ptr)();
+ NEXT_COMPONENT_FN(fn_ptr, __rt_init_rti_board_end);
+ }
}
/**
@@ -71,12 +81,12 @@ void rt_components_board_init(void)
*/
void rt_components_init(void)
{
- const init_fn_t* fn_ptr;
+ const init_fn_t *fn_ptr;
- for (fn_ptr = &__rt_init_rti_board_end; fn_ptr < &__rt_init_rti_end; )
- {
- (*fn_ptr)();
- NEXT_COMPONENT_FN(fn_ptr, __rt_init_rti_end);
- }
+ for (fn_ptr = &__rt_init_rti_board_end; fn_ptr < &__rt_init_rti_end; )
+ {
+ (*fn_ptr)();
+ NEXT_COMPONENT_FN(fn_ptr, __rt_init_rti_end);
+ }
}
diff --git a/components/init/components.h b/components/init/components.h
index 60fd139884..11d3c81788 100644
--- a/components/init/components.h
+++ b/components/init/components.h
@@ -3,9 +3,19 @@
* This file is part of RT-Thread RTOS
* COPYRIGHT (C) 2012, 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
+ * 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