You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mynewt.apache.org by we...@apache.org on 2019/03/26 04:21:16 UTC

[mynewt-core] branch master updated: kernel/os: MSYS memory pool not in mempool list

This is an automated email from the ASF dual-hosted git repository.

wes3 pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/mynewt-core.git


The following commit(s) were added to refs/heads/master by this push:
     new 284ed41  kernel/os: MSYS memory pool not in mempool list
     new 9b5fbe5  Merge pull request #1724 from wes3/msys_in_mempool_list
284ed41 is described below

commit 284ed4113558f84fc73ddb444f79e926db47705e
Author: Will San Filippo <wi...@juul.com>
AuthorDate: Mon Mar 25 18:15:39 2019 -0700

    kernel/os: MSYS memory pool not in mempool list
    
    Change the order of os_msys_init() and os_mempool_module_init() so that memory pools allocated by msys show up in the mempool list.
---
 kernel/os/src/os.c         | 2 +-
 kernel/os/src/os_mempool.c | 3 +--
 2 files changed, 2 insertions(+), 3 deletions(-)

diff --git a/kernel/os/src/os.c b/kernel/os/src/os.c
index a4b4de8..5cc9fa4 100644
--- a/kernel/os/src/os.c
+++ b/kernel/os/src/os.c
@@ -286,8 +286,8 @@ os_pkg_init(void)
     err = os_dev_initialize_all(OS_DEV_INIT_KERNEL);
     assert(err == OS_OK);
 
-    os_msys_init();
     os_mempool_module_init();
+    os_msys_init();
 }
 
 /**
diff --git a/kernel/os/src/os_mempool.c b/kernel/os/src/os_mempool.c
index 60c6799..0b70208 100644
--- a/kernel/os/src/os_mempool.c
+++ b/kernel/os/src/os_mempool.c
@@ -36,8 +36,7 @@
 #define OS_MEMPOOL_TRUE_BLOCK_SIZE(mp) OS_MEM_TRUE_BLOCK_SIZE(mp->mp_block_size)
 #endif
 
-STAILQ_HEAD(, os_mempool) g_os_mempool_list =
-    STAILQ_HEAD_INITIALIZER(g_os_mempool_list);
+STAILQ_HEAD(, os_mempool) g_os_mempool_list;
 
 #if MYNEWT_VAL(OS_MEMPOOL_POISON)
 static uint32_t os_mem_poison = 0xde7ec7ed;