mirror of
https://github.com/espressif/esp-nimble.git
synced 2026-08-16 23:17:53 +00:00
Revert "Fix crash due to less co count"
This reverts commit db24d7c82f.
co value should be correctly calculated rather than configured.
This commit is contained in:
committed by
Abhinav Kudnar
parent
a3b8e2495a
commit
60cb126055
@@ -98,6 +98,8 @@ static const char *TAG = "Timer";
|
||||
|
||||
#define BLE_TOTAL_EVQ_COUNT (10)
|
||||
|
||||
#define BLE_TOTAL_CO_COUNT (20)
|
||||
|
||||
#define BLE_TOTAL_SEM_COUNT (10)
|
||||
|
||||
#define BLE_TOTAL_MUTEX_COUNT (10)
|
||||
@@ -133,7 +135,7 @@ static os_membuf_t ble_freertos_evq_buf[
|
||||
|
||||
struct os_mempool ble_freertos_co_pool;
|
||||
static os_membuf_t ble_freertos_co_buf[
|
||||
OS_MEMPOOL_SIZE(MYNEWT_VAL(BLE_TOTAL_CO_COUNT), sizeof (struct ble_npl_callout_freertos))
|
||||
OS_MEMPOOL_SIZE(BLE_TOTAL_CO_COUNT, sizeof (struct ble_npl_callout_freertos))
|
||||
];
|
||||
|
||||
struct os_mempool ble_freertos_sem_pool;
|
||||
@@ -1097,7 +1099,7 @@ int npl_freertos_mempool_init(void)
|
||||
if(!ble_freertos_evq_buf) {
|
||||
goto _error;
|
||||
}
|
||||
ble_freertos_co_buf = malloc(OS_MEMPOOL_SIZE(MYNEWT_VAL(BLE_TOTAL_CO_COUNT), sizeof (struct ble_npl_callout_freertos)) * sizeof(os_membuf_t));
|
||||
ble_freertos_co_buf = malloc(OS_MEMPOOL_SIZE(BLE_TOTAL_CO_COUNT, sizeof (struct ble_npl_callout_freertos)) * sizeof(os_membuf_t));
|
||||
if(!ble_freertos_co_buf) {
|
||||
goto _error;
|
||||
}
|
||||
@@ -1126,7 +1128,7 @@ int npl_freertos_mempool_init(void)
|
||||
goto _error;
|
||||
}
|
||||
|
||||
rc = os_mempool_init(&ble_freertos_co_pool, MYNEWT_VAL(BLE_TOTAL_CO_COUNT),
|
||||
rc = os_mempool_init(&ble_freertos_co_pool, BLE_TOTAL_CO_COUNT,
|
||||
sizeof (struct ble_npl_callout_freertos), ble_freertos_co_buf,
|
||||
"ble_freertos_co_pool");
|
||||
if(rc != 0) {
|
||||
|
||||
Reference in New Issue
Block a user