summaryrefslogtreecommitdiff
path: root/src/slab.c
diff options
context:
space:
mode:
author[email protected] <[email protected]>2011-06-14 23:59:42 +0000
committer[email protected] <[email protected]>2011-06-14 23:59:42 +0000
commitee68988518f8aa2b7cdafc2bcfe0abe6ad7df385 (patch)
treec673b27eee805e37c3c138e4e1d4c3596f985c9b /src/slab.c
parent99dc4465a66d757b1a94220b513d30e647861b4c (diff)
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
Diffstat (limited to 'src/slab.c')
-rw-r--r--src/slab.c10
1 files changed, 3 insertions, 7 deletions
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)