diff --git a/src/clock.c b/src/clock.c index 66923e5c00c8eeb3562bcde05acb36535d06572f..0880d8d24189b242b2a8cf405ef6c6f2b97ce00b 100644 --- a/src/clock.c +++ b/src/clock.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2006-2018, RT-Thread Development Team + * Copyright (c) 2006-2021, RT-Thread Development Team * * SPDX-License-Identifier: Apache-2.0 * @@ -111,7 +111,7 @@ rt_tick_t rt_tick_from_millisecond(rt_int32_t ms) tick = RT_TICK_PER_SECOND * (ms / 1000); tick += (RT_TICK_PER_SECOND * (ms % 1000) + 999) / 1000; } - + /* return the calculated tick */ return tick; } diff --git a/src/components.c b/src/components.c index 8ea5654d0c858367ecc1d4446a9821fa4e0906ed..9709d0aae23b8b80cb9891440a624890b01260b7 100644 --- a/src/components.c +++ b/src/components.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2006-2018, RT-Thread Development Team + * Copyright (c) 2006-2021, RT-Thread Development Team * * SPDX-License-Identifier: Apache-2.0 * diff --git a/src/cpu.c b/src/cpu.c index 96e585713ba39adc1266e74b00f15b7f72942f9f..48ddb12c467f5de4da4081d206018e241f41934f 100644 --- a/src/cpu.c +++ b/src/cpu.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2006-2018, RT-Thread Development Team + * Copyright (c) 2006-2021, RT-Thread Development Team * * SPDX-License-Identifier: Apache-2.0 * diff --git a/src/device.c b/src/device.c index a4f004fb696d7ed4846a29f0aef490773f1c7f6e..388c2ecf123e603c13c22a5d81612be9be27243e 100644 --- a/src/device.c +++ b/src/device.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2006-2018, RT-Thread Development Team + * Copyright (c) 2006-2021, RT-Thread Development Team * * SPDX-License-Identifier: Apache-2.0 * diff --git a/src/idle.c b/src/idle.c index aa14552a49f2ddb9306140bfe714c1a9781bd0ab..24dfffbc6d4e6b56860cc07ebd9c7ec38b2fc555 100644 --- a/src/idle.c +++ b/src/idle.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2006-2018, RT-Thread Development Team + * Copyright (c) 2006-2021, RT-Thread Development Team * * SPDX-License-Identifier: Apache-2.0 * @@ -211,7 +211,7 @@ static void rt_thread_idle_entry(void *parameter) #endif rt_thread_idle_excute(); -#ifdef RT_USING_PM +#ifdef RT_USING_PM rt_system_power_manager(); #endif } diff --git a/src/ipc.c b/src/ipc.c index 37b05b9ae352b88de4f7f19cc8c2905bf2662929..111d724c2326f45fdcf4b1623dbbf5d44bcf5cce 100755 --- a/src/ipc.c +++ b/src/ipc.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2006-2018, RT-Thread Development Team + * Copyright (c) 2006-2021, RT-Thread Development Team * * SPDX-License-Identifier: Apache-2.0 * @@ -34,7 +34,7 @@ * 2013-09-14 Grissiom add an option check in rt_event_recv * 2018-10-02 Bernard add 64bit support for mailbox * 2019-09-16 tyx add send wait support for message queue - * 2020-07-29 Meco Man fix thread->event_set/event_info when received an + * 2020-07-29 Meco Man fix thread->event_set/event_info when received an * event without pending * 2020-10-11 Meco Man add value overflow-check code * 2021-01-03 Meco Man add rt_mb_urgent() @@ -124,7 +124,7 @@ rt_inline rt_err_t rt_ipc_list_suspend(rt_list_t *list, break; default: - break; + break; } return RT_EOK; @@ -959,7 +959,7 @@ rt_err_t rt_mutex_release(rt_mutex_t mutex) rt_hw_interrupt_enable(temp); /* enable interrupt */ return -RT_EFULL; /* value overflowed */ } - + /* clear owner */ mutex->owner = RT_NULL; mutex->original_priority = 0xff; @@ -1280,11 +1280,11 @@ rt_err_t rt_event_recv(rt_event_t event, /* set received event */ if (recved) *recved = (event->set & set); - - /* fill thread event info */ + + /* fill thread event info */ thread->event_set = (event->set & set); thread->event_info = option; - + /* received event */ if (option & RT_EVENT_FLAG_CLEAR) event->set &= ~set; @@ -1649,7 +1649,7 @@ rt_err_t rt_mb_send_wait(rt_mailbox_t mb, ++ mb->in_offset; if (mb->in_offset >= mb->size) mb->in_offset = 0; - + if(mb->entry < RT_MB_ENTRY_MAX) { /* increase message entry */ @@ -1660,7 +1660,7 @@ rt_err_t rt_mb_send_wait(rt_mailbox_t mb, rt_hw_interrupt_enable(temp); /* enable interrupt */ return -RT_EFULL; /* value overflowed */ } - + /* resume suspended thread */ if (!rt_list_isempty(&mb->parent.suspend_thread)) { @@ -2409,7 +2409,7 @@ rt_err_t rt_mq_urgent(rt_mq_t mq, const void *buffer, rt_size_t size) rt_hw_interrupt_enable(temp); /* enable interrupt */ return -RT_EFULL; /* value overflowed */ } - + /* resume suspended thread */ if (!rt_list_isempty(&mq->parent.suspend_thread)) { diff --git a/src/irq.c b/src/irq.c index 311d297bfe7760e56e3b1051d0c19311c61a732b..177c1a9ff5321adb8be5dd05d264397b1a5b37cb 100644 --- a/src/irq.c +++ b/src/irq.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2006-2018, RT-Thread Development Team + * Copyright (c) 2006-2021, RT-Thread Development Team * * SPDX-License-Identifier: Apache-2.0 * @@ -21,7 +21,7 @@ static void (*rt_interrupt_leave_hook)(void); /** * @ingroup Hook - * This function set a hook function when the system enter a interrupt + * This function set a hook function when the system enter a interrupt * * @note the hook function must be simple and never be blocked or suspend. */ @@ -31,7 +31,7 @@ void rt_interrupt_enter_sethook(void (*hook)(void)) } /** * @ingroup Hook - * This function set a hook function when the system exit a interrupt. + * This function set a hook function when the system exit a interrupt. * * @note the hook function must be simple and never be blocked or suspend. */ diff --git a/src/kservice.c b/src/kservice.c index 9fc3971c7e1d9917085a15fe04d5144ca9074186..79ee4c2b9d03512c55f20b75a3d607f8bb265579 100644 --- a/src/kservice.c +++ b/src/kservice.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2006-2018, RT-Thread Development Team + * Copyright (c) 2006-2021, RT-Thread Development Team * * SPDX-License-Identifier: Apache-2.0 * @@ -456,7 +456,7 @@ RTM_EXPORT(rt_strncmp); rt_int32_t rt_strcmp(const char *cs, const char *ct) { while (*cs && *cs == *ct) - { + { cs++; ct++; } @@ -1127,10 +1127,10 @@ rt_device_t rt_console_set_device(const char *name) /* find new console device */ new_device = rt_device_find(name); - + /* check whether it's a same device */ if (new_device == old_device) return RT_NULL; - + if (new_device != RT_NULL) { if (_console_device != RT_NULL) diff --git a/src/mem.c b/src/mem.c index c03c8b3452854b6c82ca2e94cc3b2e4e292377ef..ac0d27f2c35d4dd8e830b48ad07f2f108a07e69a 100644 --- a/src/mem.c +++ b/src/mem.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2006-2018, RT-Thread Development Team + * Copyright (c) 2006-2021, RT-Thread Development Team * * SPDX-License-Identifier: Apache-2.0 * @@ -489,7 +489,7 @@ void *rt_realloc(void *rmem, rt_size_t newsize) { ((struct heap_mem *)&heap_ptr[mem2->next])->prev = ptr2; } - + if (mem2 < lfree) { /* the splited struct is now the lowest */ diff --git a/src/memheap.c b/src/memheap.c index 449e66e9757a62b17e996c9e7982449264bf201b..a5d86f634799fb3aed6b0870f72844ed063b25d7 100644 --- a/src/memheap.c +++ b/src/memheap.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2006-2018, RT-Thread Development Team + * Copyright (c) 2006-2021, RT-Thread Development Team * * SPDX-License-Identifier: Apache-2.0 */ @@ -130,7 +130,7 @@ rt_err_t rt_memheap_detach(struct rt_memheap *heap) RT_ASSERT(heap); RT_ASSERT(rt_object_get_type(&heap->parent) == RT_Object_Class_MemHeap); RT_ASSERT(rt_object_is_systemobject(&heap->parent)); - + rt_sem_detach(&heap->lock); rt_object_detach(&(heap->parent)); @@ -765,7 +765,7 @@ void dump_used_memheap(struct rt_memheap *mh) rt_kprintf("\nmemory heap address:\n"); rt_kprintf("heap_ptr: 0x%08x\n", mh->start_addr); - rt_kprintf("free : 0x%08x\n", mh->available_size); + rt_kprintf("free : 0x%08x\n", mh->available_size); rt_kprintf("max_used: 0x%08x\n", mh->max_used_size); rt_kprintf("size : 0x%08x\n", mh->pool_size); diff --git a/src/mempool.c b/src/mempool.c index db614032aa67ac7d357408b9521192c39555adbe..1de48940d7812ae9fbb2e0095b17fa66234222ec 100644 --- a/src/mempool.c +++ b/src/mempool.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2006-2018, RT-Thread Development Team + * Copyright (c) 2006-2021, RT-Thread Development Team * * SPDX-License-Identifier: Apache-2.0 * diff --git a/src/object.c b/src/object.c index 56263618b3c5047b47ae8f77ed67e8373c42f9ae..013e2d1e336869813f6b3f287c08542772df5ffd 100644 --- a/src/object.c +++ b/src/object.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2006-2018, RT-Thread Development Team + * Copyright (c) 2006-2021, RT-Thread Development Team * * SPDX-License-Identifier: Apache-2.0 * @@ -200,7 +200,7 @@ void rt_object_put_sethook(void (*hook)(struct rt_object *object)) /** * This function will return the specified type of object information. * - * @param type the type of object, which can be + * @param type the type of object, which can be * RT_Object_Class_Thread/Semaphore/Mutex... etc * * @return the object type information or RT_NULL @@ -220,7 +220,7 @@ RTM_EXPORT(rt_object_get_information); /** * This function will return the length of object list in object container. * - * @param type the type of object, which can be + * @param type the type of object, which can be * RT_Object_Class_Thread/Semaphore/Mutex... etc * @return the length of object list */ @@ -247,10 +247,10 @@ int rt_object_get_length(enum rt_object_class_type type) RTM_EXPORT(rt_object_get_length); /** - * This function will copy the object pointer of the specified type, + * This function will copy the object pointer of the specified type, * with the maximum size specified by maxlen. * - * @param type the type of object, which can be + * @param type the type of object, which can be * RT_Object_Class_Thread/Semaphore/Mutex... etc * @param pointers the pointers will be saved to * @param maxlen the maximum number of pointers can be saved diff --git a/src/scheduler.c b/src/scheduler.c index 06f305ea0b0ba6a49c3200a07d49e5d68f4daf1f..c03c20d030bf74ea6616d5b57e8844162a0ee0a4 100644 --- a/src/scheduler.c +++ b/src/scheduler.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2006-2018, RT-Thread Development Team + * Copyright (c) 2006-2021, RT-Thread Development Team * * SPDX-License-Identifier: Apache-2.0 * @@ -270,10 +270,10 @@ void rt_system_scheduler_start(void) #ifdef RT_USING_SMP /** * This function will handle IPI interrupt and do a scheduling in system; - * + * * @param vector, the number of IPI interrupt for system scheduling * @param param, use RT_NULL - * + * * NOTE: this function should be invoke or register as ISR in BSP. */ void rt_scheduler_ipi_handler(int vector, void *param) @@ -283,7 +283,7 @@ void rt_scheduler_ipi_handler(int vector, void *param) /** * This function will perform one scheduling. It will select one thread - * with the highest priority level in global ready queue or local ready queue, + * with the highest priority level in global ready queue or local ready queue, * then switch to it. */ void rt_schedule(void) diff --git a/src/signal.c b/src/signal.c index bb9339ab6c3f216cdaa5ab3569aa70543d415232..c2c3e975cb4c9c8ba30f9dd9a51bb80ef18fc0bd 100644 --- a/src/signal.c +++ b/src/signal.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2006-2018, RT-Thread Development Team + * Copyright (c) 2006-2021, RT-Thread Development Team * * SPDX-License-Identifier: Apache-2.0 * diff --git a/src/slab.c b/src/slab.c index 0872ecf092251ce7b638de12fb598ea621bdb437..12ca1a938cc584dc0a93083544e9e339c96a938d 100644 --- a/src/slab.c +++ b/src/slab.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2006-2018, RT-Thread Development Team + * Copyright (c) 2006-2021, RT-Thread Development Team * * SPDX-License-Identifier: Apache-2.0 */ diff --git a/src/thread.c b/src/thread.c index beef93f46a9c1798d8b7c3fcf219f15e763d48a1..402ed66acb9c63a2569020a25c111b45152d84b3 100644 --- a/src/thread.c +++ b/src/thread.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2006-2018, RT-Thread Development Team + * Copyright (c) 2006-2021, RT-Thread Development Team * * SPDX-License-Identifier: Apache-2.0 * diff --git a/src/timer.c b/src/timer.c index 2eaca225bc4a39477eebfe22e626e6d2056384ba..836df51e06f6a540f6b6152bef17ac66b06e1053 100644 --- a/src/timer.c +++ b/src/timer.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2006-2018, RT-Thread Development Team + * Copyright (c) 2006-2021, RT-Thread Development Team * * SPDX-License-Identifier: Apache-2.0 *