From a22decb71ba92fdd879914be50809c97f0defb07 Mon Sep 17 00:00:00 2001 From: guozhanxin Date: Mon, 23 Nov 2020 11:36:04 +0800 Subject: 【优化】在代码中移除 rt_system_object_init/rt_system_tick_init 的调用。 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/clock.c | 11 ----------- src/object.c | 12 ------------ 2 files changed, 23 deletions(-) (limited to 'src') diff --git a/src/clock.c b/src/clock.c index a91cd829b6..9fd276cf6f 100644 --- a/src/clock.c +++ b/src/clock.c @@ -24,17 +24,6 @@ static rt_tick_t rt_tick = 0; #endif -/** - * This function will initialize system tick and set it to zero. - * @ingroup SystemInit - * - * @deprecated since 1.1.0, this function does not need to be invoked - * in the system initialization. - */ -void rt_system_tick_init(void) -{ -} - /** * @addtogroup Clock */ diff --git a/src/object.c b/src/object.c index 6866d805ca..fbd3879f67 100644 --- a/src/object.c +++ b/src/object.c @@ -191,18 +191,6 @@ void rt_object_put_sethook(void (*hook)(struct rt_object *object)) /**@}*/ #endif -/** - * @ingroup SystemInit - * - * This function will initialize system object management. - * - * @deprecated since 0.3.0, this function does not need to be invoked - * in the system initialization. - */ -void rt_system_object_init(void) -{ -} - /** * @addtogroup KernelObject */ -- cgit v1.3.1 From 05f631aa3a4f398d9a326a6f61d3bd9309dd2d39 Mon Sep 17 00:00:00 2001 From: Meco Man <920369182@qq.com> Date: Tue, 24 Nov 2020 04:17:50 +0800 Subject: [kernel] rt_object_delete函数优化重置object->type MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit object->type = 0; 改为 object->type = RT_Object_Class_Null; 一个东西,但是提高源码可读性 --- src/object.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/object.c b/src/object.c index 6866d805ca..dc3354f76d 100644 --- a/src/object.c +++ b/src/object.c @@ -485,7 +485,7 @@ void rt_object_delete(rt_object_t object) RT_OBJECT_HOOK_CALL(rt_object_detach_hook, (object)); /* reset object type */ - object->type = 0; + object->type = RT_Object_Class_Null; /* lock interrupt */ temp = rt_hw_interrupt_disable(); -- cgit v1.3.1