diff options
author | gdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4> | 2013-07-20 07:24:12 +0000 |
---|---|---|
committer | gdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4> | 2013-07-20 07:24:12 +0000 |
commit | 390ed322cb8f40cb9250021cde5f48acb928d291 (patch) | |
tree | 1dc550fc749284146c42417ff1d5d40ac1823d5f /os/kernel/src/chheap.c | |
parent | 25ddb1c801f06a3be7171e20dcfd46d11a75f112 (diff) | |
download | ChibiOS-390ed322cb8f40cb9250021cde5f48acb928d291.tar.gz ChibiOS-390ed322cb8f40cb9250021cde5f48acb928d291.tar.bz2 ChibiOS-390ed322cb8f40cb9250021cde5f48acb928d291.zip |
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/branches/kernel_3_dev@6001 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'os/kernel/src/chheap.c')
-rw-r--r-- | os/kernel/src/chheap.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/os/kernel/src/chheap.c b/os/kernel/src/chheap.c index 4f20d3920..b41817123 100644 --- a/os/kernel/src/chheap.c +++ b/os/kernel/src/chheap.c @@ -88,9 +88,9 @@ void _heap_init(void) { default_heap.h_free.h.u.next = (union heap_header *)NULL;
default_heap.h_free.h.size = 0;
#if CH_USE_MUTEXES || defined(__DOXYGEN__)
- chMtxInit(&default_heap.h_mtx);
+ chMtxObjectInit(&default_heap.h_mtx);
#else
- chSemInit(&default_heap.h_sem, 1);
+ chSemObjectInit(&default_heap.h_sem, 1);
#endif
}
@@ -105,7 +105,7 @@ void _heap_init(void) { *
* @init
*/
-void chHeapInit(memory_heap_t *heapp, void *buf, size_t size) {
+void chHeapObjectInit(memory_heap_t *heapp, void *buf, size_t size) {
union heap_header *hp;
chDbgCheck(MEM_IS_ALIGNED(buf) && MEM_IS_ALIGNED(size), "chHeapInit");
@@ -116,9 +116,9 @@ void chHeapInit(memory_heap_t *heapp, void *buf, size_t size) { hp->h.u.next = NULL;
hp->h.size = size - sizeof(union heap_header);
#if CH_USE_MUTEXES || defined(__DOXYGEN__)
- chMtxInit(&heapp->h_mtx);
+ chMtxObjectInit(&heapp->h_mtx);
#else
- chSemInit(&heapp->h_sem, 1);
+ chSemObjectInit(&heapp->h_sem, 1);
#endif
}
@@ -211,7 +211,7 @@ void chHeapFree(void *p) { qp = &heapp->h_free;
H_LOCK(heapp);
- while (TRUE) {
+ while (true) {
chDbgAssert((hp < qp) || (hp >= LIMIT(qp)),
"chHeapFree(), #1",
"within free block");
|