Merge branch 'RT-Thread:master' into tail
This commit is contained in:
commit
1106455fc3
|
@ -250,7 +250,7 @@ void rt_system_heap_init(void *begin_addr, void *end_addr)
|
||||||
rt_mem_setname(heap_end, "INIT");
|
rt_mem_setname(heap_end, "INIT");
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
rt_sem_init(&heap_sem, "heap", 1, RT_IPC_FLAG_FIFO);
|
rt_sem_init(&heap_sem, "heap", 1, RT_IPC_FLAG_PRIO);
|
||||||
|
|
||||||
/* initialize the lowest-free pointer to the start of the heap */
|
/* initialize the lowest-free pointer to the start of the heap */
|
||||||
lfree = (struct heap_mem *)heap_ptr;
|
lfree = (struct heap_mem *)heap_ptr;
|
||||||
|
|
|
@ -155,7 +155,7 @@ rt_err_t rt_memheap_init(struct rt_memheap *memheap,
|
||||||
item->next_free = item->prev_free = RT_NULL;
|
item->next_free = item->prev_free = RT_NULL;
|
||||||
|
|
||||||
/* initialize semaphore lock */
|
/* initialize semaphore lock */
|
||||||
rt_sem_init(&(memheap->lock), name, 1, RT_IPC_FLAG_FIFO);
|
rt_sem_init(&(memheap->lock), name, 1, RT_IPC_FLAG_PRIO);
|
||||||
|
|
||||||
RT_DEBUG_LOG(RT_DEBUG_MEMHEAP,
|
RT_DEBUG_LOG(RT_DEBUG_MEMHEAP,
|
||||||
("memory heap: start addr 0x%08x, size %d, free list header 0x%08x\n",
|
("memory heap: start addr 0x%08x, size %d, free list header 0x%08x\n",
|
||||||
|
|
|
@ -363,7 +363,7 @@ void rt_system_heap_init(void *begin_addr, void *end_addr)
|
||||||
npages = limsize / RT_MM_PAGE_SIZE;
|
npages = limsize / RT_MM_PAGE_SIZE;
|
||||||
|
|
||||||
/* initialize heap semaphore */
|
/* initialize heap semaphore */
|
||||||
rt_sem_init(&heap_sem, "heap", 1, RT_IPC_FLAG_FIFO);
|
rt_sem_init(&heap_sem, "heap", 1, RT_IPC_FLAG_PRIO);
|
||||||
|
|
||||||
RT_DEBUG_LOG(RT_DEBUG_SLAB, ("heap[0x%x - 0x%x], size 0x%x, 0x%x pages\n",
|
RT_DEBUG_LOG(RT_DEBUG_SLAB, ("heap[0x%x - 0x%x], size 0x%x, 0x%x pages\n",
|
||||||
heap_start, heap_end, limsize, npages));
|
heap_start, heap_end, limsize, npages));
|
||||||
|
|
Loading…
Reference in New Issue