summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authoryangjie <[email protected]>2020-12-28 12:02:31 +0800
committeryangjie <[email protected]>2020-12-28 12:02:31 +0800
commiteeaf1fcc50a9a6d25bebcc531db8e03baafaded3 (patch)
tree3a7e70fbb26fad36211874a5bc4f9f9f22c8fa38 /src
parentef62febf1f2461bdd72efcffde050905865a99c5 (diff)
parente3e86337862c6d84f2b55906a49d48aa33084d39 (diff)
resolve Conflicts
bsp/nrf52832/board/Sconscript bsp/nrf52832/startups/Sconscript bsp/raspberry-pi/raspi4-32/driver/SConscript
Diffstat (limited to 'src')
-rw-r--r--src/Kconfig14
-rw-r--r--src/SConscript3
-rw-r--r--src/clock.c11
-rw-r--r--src/object.c14
-rw-r--r--src/scheduler.c7
-rw-r--r--src/timer.c8
6 files changed, 20 insertions, 37 deletions
diff --git a/src/Kconfig b/src/Kconfig
index 63a7a67887..803c827e51 100644
--- a/src/Kconfig
+++ b/src/Kconfig
@@ -270,6 +270,18 @@ menu "Memory Management"
config RT_USING_MEMHEAP_AS_HEAP
bool "Use all of memheap objects as heap"
endif
+
+ config RT_USING_USERHEAP
+ bool "Use user heap"
+ help
+ If this option is selected, please implement these functions:
+ rt_malloc(), rt_malloc_sethook()
+ rt_free(), rt_free_sethook()
+ rt_calloc(), rt_realloc()
+ rt_system_heap_init()
+
+ And if FinSH is used at the same time, please implement list_mem()
+
endchoice
if RT_USING_SMALL_MEM
@@ -294,7 +306,7 @@ menu "Memory Management"
default y if RT_USING_SMALL_MEM
default y if RT_USING_SLAB
default y if RT_USING_MEMHEAP_AS_HEAP
-
+ default y if RT_USING_USERHEAP
endmenu
menu "Kernel Device Object"
diff --git a/src/SConscript b/src/SConscript
index c03d997cd1..c3a7775d75 100644
--- a/src/SConscript
+++ b/src/SConscript
@@ -23,6 +23,9 @@ if GetDepend('RT_USING_MEMHEAP') == False:
if GetDepend('RT_USING_MEMHEAP_AS_HEAP'):
SrcRemove(src, ['mem.c'])
+if GetDepend('RT_USING_USERHEAP'):
+ SrcRemove(src, ['mem.c', 'slab.c'])
+
if GetDepend('RT_USING_DEVICE') == False:
SrcRemove(src, ['device.c'])
diff --git a/src/clock.c b/src/clock.c
index a91cd829b6..9fd276cf6f 100644
--- a/src/clock.c
+++ b/src/clock.c
@@ -25,17 +25,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..56263618b3 100644
--- a/src/object.c
+++ b/src/object.c
@@ -192,18 +192,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
*/
@@ -485,7 +473,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();
diff --git a/src/scheduler.c b/src/scheduler.c
index 2250c4a006..677be6cff7 100644
--- a/src/scheduler.c
+++ b/src/scheduler.c
@@ -90,12 +90,7 @@ static void _rt_scheduler_stack_check(struct rt_thread *thread)
rt_ubase_t level;
rt_kprintf("thread:%s stack overflow\n", thread->name);
-#ifdef RT_USING_FINSH
- {
- extern long list_thread(void);
- list_thread();
- }
-#endif
+
level = rt_hw_interrupt_disable();
while (level);
}
diff --git a/src/timer.c b/src/timer.c
index 4b9003794c..d882711151 100644
--- a/src/timer.c
+++ b/src/timer.c
@@ -331,7 +331,6 @@ rt_err_t rt_timer_start(rt_timer_t timer)
_rt_timer_remove(timer);
/* change status of timer */
timer->parent.flag &= ~RT_TIMER_FLAG_ACTIVATED;
- rt_hw_interrupt_enable(level);
RT_OBJECT_HOOK_CALL(rt_object_take_hook, (&(timer->parent)));
@@ -342,9 +341,6 @@ rt_err_t rt_timer_start(rt_timer_t timer)
RT_ASSERT(timer->init_tick < RT_TICK_MAX / 2);
timer->timeout_tick = rt_tick_get() + timer->init_tick;
- /* disable interrupt */
- level = rt_hw_interrupt_disable();
-
#ifdef RT_USING_TIMER_SOFT
if (timer->parent.flag & RT_TIMER_FLAG_SOFT_TIMER)
{
@@ -579,7 +575,7 @@ void rt_timer_check(void)
{
continue;
}
-
+ rt_list_remove(&(t->row[RT_TIMER_SKIP_LIST_LEVEL - 1]));
if ((t->parent.flag & RT_TIMER_FLAG_PERIODIC) &&
(t->parent.flag & RT_TIMER_FLAG_ACTIVATED))
{
@@ -667,7 +663,7 @@ void rt_soft_timer_check(void)
{
continue;
}
-
+ rt_list_remove(&(t->row[RT_TIMER_SKIP_LIST_LEVEL - 1]));
if ((t->parent.flag & RT_TIMER_FLAG_PERIODIC) &&
(t->parent.flag & RT_TIMER_FLAG_ACTIVATED))
{