From ee68988518f8aa2b7cdafc2bcfe0abe6ad7df385 Mon Sep 17 00:00:00 2001 From: "bernard.xiong@gmail.com" Date: Tue, 14 Jun 2011 23:59:42 +0000 Subject: change the RT_DEBUG_NOT_REENT to RT_DEBUG_NOT_IN_INTERRUPT. git-svn-id: https://rt-thread.googlecode.com/svn/trunk@1503 bbd45198-f89e-11dd-88c7-29a3b14d5316 --- src/slab.c | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) (limited to 'src/slab.c') diff --git a/src/slab.c b/src/slab.c index b7ec301823..af044662af 100644 --- a/src/slab.c +++ b/src/slab.c @@ -337,7 +337,7 @@ void rt_system_heap_init(void *begin_addr, void* end_addr) { rt_uint32_t limsize, npages; - RT_DEBUG_NOT_REENT + RT_DEBUG_NOT_IN_INTERRUPT; /* align begin and end addr to page */ heap_start = RT_ALIGN((rt_uint32_t)begin_addr, RT_MM_PAGE_SIZE); @@ -681,9 +681,7 @@ void *rt_malloc(rt_size_t size) done: rt_sem_release(&heap_sem); -#ifdef RT_USING_HOOK - RT_OBJECT_HOOK_CALL2(rt_malloc_hook,(char*)chunk, size); -#endif + RT_OBJECT_HOOK_CALL(rt_malloc_hook, ((char*)chunk, size)); return chunk; @@ -797,9 +795,7 @@ void rt_free(void *ptr) /* free a RT_NULL pointer */ if (ptr == RT_NULL) return ; -#ifdef RT_USING_HOOK - RT_OBJECT_HOOK_CALL2(rt_free_hook,ptr); -#endif + RT_OBJECT_HOOK_CALL(rt_free_hook, (ptr)); #ifdef RT_USING_MODULE if(rt_module_self() != RT_NULL) -- cgit v1.3.1