summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/clock.c16
-rw-r--r--src/device.c22
-rw-r--r--src/idle.c16
-rw-r--r--src/ipc.c24
-rw-r--r--src/irq.c20
-rw-r--r--src/kservice.c34
-rw-r--r--src/mem.c24
-rw-r--r--src/memheap.c16
-rw-r--r--src/mempool.c18
-rw-r--r--src/module.c20
-rw-r--r--src/module.h20
-rw-r--r--src/object.c24
-rw-r--r--src/scheduler.c24
-rw-r--r--src/slab.c22
-rw-r--r--src/thread.c18
-rw-r--r--src/timer.c20
16 files changed, 249 insertions, 89 deletions
diff --git a/src/clock.c b/src/clock.c
index 436ab3a8a8..63f65b874a 100644
--- a/src/clock.c
+++ b/src/clock.c
@@ -3,9 +3,19 @@
* This file is part of RT-Thread RTOS
* COPYRIGHT (C) 2006 - 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
diff --git a/src/device.c b/src/device.c
index 4e46478783..1335c7fd2c 100644
--- a/src/device.c
+++ b/src/device.c
@@ -3,15 +3,25 @@
* This file is part of RT-Thread RTOS
* COPYRIGHT (C) 2006 - 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
* 2007-01-21 Bernard the first version
* 2010-05-04 Bernard add rt_device_init implementation
- * 2012-10-20 Bernard add device check in register function,
+ * 2012-10-20 Bernard add device check in register function,
* provided by Rob <[email protected]>
* 2012-12-25 Bernard return RT_EOK if the device interface not exist.
*/
@@ -158,7 +168,7 @@ RTM_EXPORT(rt_device_find);
* This function will initialize the specified device
*
* @param dev the pointer of device driver structure
- *
+ *
* @return the result
*/
rt_err_t rt_device_init(rt_device_t dev)
@@ -377,7 +387,7 @@ rt_device_set_rx_indicate(rt_device_t dev,
RTM_EXPORT(rt_device_set_rx_indicate);
/**
- * This function will set the indication callback function when device has
+ * This function will set the indication callback function when device has
* written data to physical hardware.
*
* @param dev the pointer of device driver structure
diff --git a/src/idle.c b/src/idle.c
index eaf925e1ae..ff3fde21c5 100644
--- a/src/idle.c
+++ b/src/idle.c
@@ -3,9 +3,19 @@
* This file is part of RT-Thread RTOS
* COPYRIGHT (C) 2006 - 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
diff --git a/src/ipc.c b/src/ipc.c
index 271eef9b97..54cad042ba 100644
--- a/src/ipc.c
+++ b/src/ipc.c
@@ -3,9 +3,19 @@
* This file is part of RT-Thread RTOS
* COPYRIGHT (C) 2006 - 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
@@ -1214,7 +1224,7 @@ rt_err_t rt_event_control(rt_event_t event, rt_uint8_t cmd, void *arg)
return -RT_ERROR;
}
-RTM_EXPORT(rt_event_control);
+RTM_EXPORT(rt_event_control);
#endif /* end of RT_USING_EVENT */
#ifdef RT_USING_MAILBOX
@@ -1568,7 +1578,7 @@ rt_err_t rt_mb_recv(rt_mailbox_t mb, rt_uint32_t *value, rt_int32_t timeout)
rt_hw_interrupt_enable(temp);
thread->error = -RT_ETIMEOUT;
-
+
return -RT_ETIMEOUT;
}
@@ -1693,7 +1703,7 @@ rt_err_t rt_mb_control(rt_mailbox_t mb, rt_uint8_t cmd, void *arg)
return -RT_ERROR;
}
-RTM_EXPORT(rt_mb_control);
+RTM_EXPORT(rt_mb_control);
#endif /* end of RT_USING_MAILBOX */
#ifdef RT_USING_MESSAGEQUEUE
@@ -2199,7 +2209,7 @@ rt_err_t rt_mq_recv(rt_mq_t mq,
return RT_EOK;
}
-RTM_EXPORT(rt_mq_recv);
+RTM_EXPORT(rt_mq_recv);
/**
* This function can get or set some extra attributions of a message queue
diff --git a/src/irq.c b/src/irq.c
index 334b4b9e4a..70b18e018c 100644
--- a/src/irq.c
+++ b/src/irq.c
@@ -3,9 +3,19 @@
* This file is part of RT-Thread RTOS
* COPYRIGHT (C) 2006 - 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
@@ -68,10 +78,10 @@ RTM_EXPORT(rt_interrupt_leave);
/**
* This function will return the nest of interrupt.
- *
+ *
* User application can invoke this function to get whether current
* context is interrupt context.
- *
+ *
* @return the number of nested interrupts.
*/
rt_uint8_t rt_interrupt_get_nest(void)
diff --git a/src/kservice.c b/src/kservice.c
index 88461c2fcf..ff5ff9de2a 100644
--- a/src/kservice.c
+++ b/src/kservice.c
@@ -3,9 +3,19 @@
* This file is part of RT-Thread RTOS
* COPYRIGHT (C) 2006 - 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
@@ -16,7 +26,7 @@
* fix gcc compiling issue.
* 2010-04-15 Bernard remove weak definition on ICCM16C compiler
* 2012-07-18 Arda add the alignment display for signed integer
- * 2012-11-23 Bernard fix IAR compiler error.
+ * 2012-11-23 Bernard fix IAR compiler error.
* 2012-12-22 Bernard fix rt_kprintf issue, which found by Grissiom.
* 2013-06-24 Bernard remove rt_kprintf if RT_USING_CONSOLE is not defined.
*/
@@ -84,7 +94,7 @@ void rt_set_errno(rt_err_t error)
if (tid == RT_NULL)
{
_errno = error;
-
+
return;
}
@@ -100,7 +110,7 @@ RTM_EXPORT(rt_set_errno);
int *_rt_errno(void)
{
rt_thread_t tid;
-
+
if (rt_interrupt_get_nest() != 0)
return (int *)&_errno;
@@ -1207,13 +1217,13 @@ const rt_uint8_t __lowest_bit_bitmap[] =
};
/**
- * This function finds the first bit set (beginning with the least significant bit)
+ * This function finds the first bit set (beginning with the least significant bit)
* in value and return the index of that bit.
*
- * Bits are numbered starting at 1 (the least significant bit). A return value of
+ * Bits are numbered starting at 1 (the least significant bit). A return value of
* zero from any of these functions means that the argument was zero.
- *
- * @return return the index of the first bit set. If value is 0, then this function
+ *
+ * @return return the index of the first bit set. If value is 0, then this function
* shall return 0.
*/
int __rt_ffs(int value)
@@ -1225,10 +1235,10 @@ int __rt_ffs(int value)
if (value & 0xff00)
return __lowest_bit_bitmap[(value & 0xff00) >> 8] + 9;
-
+
if (value & 0xff0000)
return __lowest_bit_bitmap[(value & 0xff0000) >> 16] + 17;
-
+
return __lowest_bit_bitmap[(value & 0xff000000) >> 24] + 25;
}
#endif
diff --git a/src/mem.c b/src/mem.c
index 04cf7109de..e8aae72489 100644
--- a/src/mem.c
+++ b/src/mem.c
@@ -3,9 +3,19 @@
* This file is part of RT-Thread RTOS
* COPYRIGHT (C) 2008 - 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
@@ -346,7 +356,7 @@ void *rt_malloc(rt_size_t size)
RT_ASSERT((((rt_uint32_t)mem) & (RT_ALIGN_SIZE-1)) == 0);
RT_DEBUG_LOG(RT_DEBUG_MEM,
- ("allocate memory at 0x%x, size: %d\n",
+ ("allocate memory at 0x%x, size: %d\n",
(rt_uint32_t)((rt_uint8_t *)mem + SIZEOF_STRUCT_MEM),
(rt_uint32_t)(mem->next - ((rt_uint8_t *)mem - heap_ptr))));
@@ -448,7 +458,7 @@ void *rt_realloc(void *rmem, rt_size_t newsize)
nmem = rt_malloc(newsize);
if (nmem != RT_NULL) /* check memory */
{
- rt_memcpy(nmem, rmem, size < newsize ? size : newsize);
+ rt_memcpy(nmem, rmem, size < newsize ? size : newsize);
rt_free(rmem);
}
@@ -517,8 +527,8 @@ void rt_free(void *rmem)
mem = (struct heap_mem *)((rt_uint8_t *)rmem - SIZEOF_STRUCT_MEM);
RT_DEBUG_LOG(RT_DEBUG_MEM,
- ("release memory 0x%x, size: %d\n",
- (rt_uint32_t)rmem,
+ ("release memory 0x%x, size: %d\n",
+ (rt_uint32_t)rmem,
(rt_uint32_t)(mem->next - ((rt_uint8_t *)mem - heap_ptr))));
diff --git a/src/memheap.c b/src/memheap.c
index a12a7e7582..4aae16432f 100644
--- a/src/memheap.c
+++ b/src/memheap.c
@@ -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
diff --git a/src/mempool.c b/src/mempool.c
index 7c3a510325..c9bcd7a45c 100644
--- a/src/mempool.c
+++ b/src/mempool.c
@@ -3,9 +3,19 @@
* This file is part of RT-Thread RTOS
* COPYRIGHT (C) 2006 - 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
@@ -284,7 +294,7 @@ rt_err_t rt_mp_delete(rt_mp_t mp)
#if defined(RT_USING_MODULE) && defined(RT_USING_SLAB)
/* the mp object belongs to an application module */
- if (mp->parent.flag & RT_OBJECT_FLAG_MODULE)
+ if (mp->parent.flag & RT_OBJECT_FLAG_MODULE)
rt_module_free(mp->parent.module_id, mp->start_address);
else
#endif
diff --git a/src/module.c b/src/module.c
index 303b33cc26..5469d46523 100644
--- a/src/module.c
+++ b/src/module.c
@@ -3,9 +3,19 @@
* This file is part of RT-Thread RTOS
* COPYRIGHT (C) 2006 - 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
@@ -15,7 +25,7 @@
* 2011-05-25 yi.qiu implement module hook function
* 2011-06-23 yi.qiu rewrite module memory allocator
* 2012-11-23 Bernard using RT_DEBUG_LOG instead of rt_kprintf.
- * 2012-11-28 Bernard remove rt_current_module and user
+ * 2012-11-28 Bernard remove rt_current_module and user
* can use rt_module_unload to remove a module.
*/
@@ -803,7 +813,7 @@ rt_module_t rt_module_load(const char *name, void *module_ptr)
module->mem_list = RT_NULL;
/* create page array */
- module->page_array =
+ module->page_array =
(void *)rt_malloc(PAGE_COUNT_MAX * sizeof(struct rt_page_info));
module->page_cnt = 0;
#endif
diff --git a/src/module.h b/src/module.h
index 4f3b658b6c..d2d4c4fcc8 100644
--- a/src/module.h
+++ b/src/module.h
@@ -3,9 +3,19 @@
* This file is part of RT-Thread RTOS
* COPYRIGHT (C) 2006 - 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
@@ -137,7 +147,7 @@ typedef struct elf32_sym
#define STB_GLOBAL 1
#define STB_WEAK 2
#define STB_NUM 3
-
+
#define STB_LOPROC 13 /* processor specific range */
#define STB_HIPROC 15
@@ -153,7 +163,7 @@ typedef struct elf32_sym
#define STT_HIOS 12
#define STT_LOPROC 13 /* processor specific range */
#define STT_HIPROC 15
-
+
#define STN_UNDEF 0 /* undefined */
#define ELF_ST_BIND(info) ((info) >> 4)
diff --git a/src/object.c b/src/object.c
index 24cfa7b944..ed3173a0f5 100644
--- a/src/object.c
+++ b/src/object.c
@@ -3,9 +3,19 @@
* This file is part of RT-Thread RTOS
* COPYRIGHT (C) 2006 - 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
@@ -172,7 +182,7 @@ void rt_system_object_init(void)
/**
* This function will return the specified type of object information.
- *
+ *
* @param type the type of object
* @return the object type information or RT_NULL
*/
@@ -200,7 +210,7 @@ void rt_object_init(struct rt_object *object,
#ifdef RT_USING_MODULE
/* get module object information */
- information = (rt_module_self() != RT_NULL) ?
+ information = (rt_module_self() != RT_NULL) ?
&rt_module_self()->module_object[type] : &rt_object_container[type];
#else
/* get object information */
@@ -287,7 +297,7 @@ rt_object_t rt_object_allocate(enum rt_object_class_type type, const char *name)
/* no memory can be allocated */
return RT_NULL;
}
-
+
/* initialize object's parameters */
/* set object type */
@@ -347,7 +357,7 @@ void rt_object_delete(rt_object_t object)
rt_hw_interrupt_enable(temp);
#if defined(RT_USING_MODULE) && defined(RT_USING_SLAB)
- if (object->flag & RT_OBJECT_FLAG_MODULE)
+ if (object->flag & RT_OBJECT_FLAG_MODULE)
rt_module_free((rt_module_t)object->module_id, object);
else
#endif
diff --git a/src/scheduler.c b/src/scheduler.c
index ad618d1a61..4889083f0a 100644
--- a/src/scheduler.c
+++ b/src/scheduler.c
@@ -3,9 +3,19 @@
* This file is part of RT-Thread RTOS
* COPYRIGHT (C) 2006 - 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
@@ -269,11 +279,11 @@ void rt_schedule_insert_thread(struct rt_thread *thread)
/* set priority mask */
#if RT_THREAD_PRIORITY_MAX <= 32
- RT_DEBUG_LOG(RT_DEBUG_SCHEDULER, ("insert thread[%s], the priority: %d\n",
+ RT_DEBUG_LOG(RT_DEBUG_SCHEDULER, ("insert thread[%s], the priority: %d\n",
thread->name, thread->current_priority));
#else
RT_DEBUG_LOG(RT_DEBUG_SCHEDULER,
- ("insert thread[%s], the priority: %d 0x%x %d\n",
+ ("insert thread[%s], the priority: %d 0x%x %d\n",
thread->name,
thread->number,
thread->number_mask,
@@ -306,11 +316,11 @@ void rt_schedule_remove_thread(struct rt_thread *thread)
temp = rt_hw_interrupt_disable();
#if RT_THREAD_PRIORITY_MAX <= 32
- RT_DEBUG_LOG(RT_DEBUG_SCHEDULER, ("remove thread[%s], the priority: %d\n",
+ RT_DEBUG_LOG(RT_DEBUG_SCHEDULER, ("remove thread[%s], the priority: %d\n",
thread->name, thread->current_priority));
#else
RT_DEBUG_LOG(RT_DEBUG_SCHEDULER,
- ("remove thread[%s], the priority: %d 0x%x %d\n",
+ ("remove thread[%s], the priority: %d 0x%x %d\n",
thread->name,
thread->number,
thread->number_mask,
diff --git a/src/slab.c b/src/slab.c
index 362135451f..78355d0e46 100644
--- a/src/slab.c
+++ b/src/slab.c
@@ -3,9 +3,19 @@
* This file is part of RT-Thread RTOS
* COPYRIGHT (C) 2008 - 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
@@ -210,7 +220,7 @@ static int zone_page_cnt;
#define PAGE_TYPE_FREE 0x00
#define PAGE_TYPE_SMALL 0x01
#define PAGE_TYPE_LARGE 0x02
-struct memusage
+struct memusage
{
rt_uint32_t type:2 ; /* page type */
rt_uint32_t size:30; /* pages allocated or offset from zone */
@@ -358,7 +368,7 @@ void rt_system_heap_init(void *begin_addr, void *end_addr)
return;
}
-
+
limsize = heap_end - heap_start;
npages = limsize / RT_MM_PAGE_SIZE;
@@ -795,7 +805,7 @@ void rt_free(void *ptr)
#ifdef RT_USING_MODULE
if(rt_module_self() != RT_NULL)
{
- rt_module_free(rt_module_self(), ptr);
+ rt_module_free(rt_module_self(), ptr);
return;
}
diff --git a/src/thread.c b/src/thread.c
index 5ab9e1b0c1..da77ace289 100644
--- a/src/thread.c
+++ b/src/thread.c
@@ -3,9 +3,19 @@
* This file is part of RT-Thread RTOS
* COPYRIGHT (C) 2006 - 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
@@ -555,7 +565,7 @@ rt_err_t rt_thread_suspend(rt_thread_t thread)
{
RT_DEBUG_LOG(RT_DEBUG_THREAD, ("thread suspend: thread disorder, %d\n",
thread->stat));
-
+
return -RT_ERROR;
}
diff --git a/src/timer.c b/src/timer.c
index 2a27d9d9a8..30ed9b1202 100644
--- a/src/timer.c
+++ b/src/timer.c
@@ -3,9 +3,19 @@
* This file is part of RT-Thread RTOS
* COPYRIGHT (C) 2006 - 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
@@ -95,7 +105,7 @@ static rt_tick_t rt_timer_list_next_timeout(rt_list_t *timer_list)
if (rt_list_isempty(timer_list))
return RT_TICK_MAX;
-
+
timer = rt_list_entry(timer_list->next, struct rt_timer, list);
return timer->timeout_tick;
@@ -528,7 +538,7 @@ void rt_soft_timer_check(void)
static void rt_thread_timer_entry(void *parameter)
{
rt_tick_t next_timeout;
-
+
while (1)
{
/* get the next timeout tick */