diff --git a/lib/include/srslte/common/buffer_pool.h b/lib/include/srslte/common/buffer_pool.h index 182c287e3..eec35b79a 100644 --- a/lib/include/srslte/common/buffer_pool.h +++ b/lib/include/srslte/common/buffer_pool.h @@ -76,7 +76,7 @@ public: { printf("%d buffers in queue\n", (int) used.size()); for (uint32_t i=0;idebug_name?used[i]->debug_name:"Undefined"); + printf("%s\n", strlen(used[i]->debug_name)?used[i]->debug_name:"Undefined"); } } @@ -97,7 +97,8 @@ public: } #ifdef SRSLTE_BUFFER_POOL_LOG_ENABLED if (debug_name) { - strncpy(b->debug_name, debug_name, 128); + strncpy(b->debug_name, debug_name, SRSLTE_BUFFER_POOL_LOG_NAME_LEN); + b->debug_name[SRSLTE_BUFFER_POOL_LOG_NAME_LEN-1] = 0; } #endif diff --git a/lib/include/srslte/common/common.h b/lib/include/srslte/common/common.h index d1f2f770f..5f13ab214 100644 --- a/lib/include/srslte/common/common.h +++ b/lib/include/srslte/common/common.h @@ -54,6 +54,7 @@ #ifdef SRSLTE_BUFFER_POOL_LOG_ENABLED #define pool_allocate (pool->allocate(__FUNCTION__)) +#define SRSLTE_BUFFER_POOL_LOG_NAME_LEN 128 #else #define pool_allocate (pool->allocate()) #endif @@ -121,7 +122,7 @@ public: uint8_t buffer[SRSLTE_MAX_BUFFER_SIZE_BYTES]; uint8_t *msg; #ifdef SRSLTE_BUFFER_POOL_LOG_ENABLED - char debug_name[128]; + char debug_name[SRSLTE_BUFFER_POOL_LOG_NAME_LEN]; #endif byte_buffer_t():N_bytes(0) @@ -129,6 +130,9 @@ public: timestamp_is_set = false; msg = &buffer[SRSLTE_BUFFER_HEADER_OFFSET]; next = NULL; +#ifdef SRSLTE_BUFFER_POOL_LOG_ENABLED + debug_name[0] = 0; +#endif } byte_buffer_t(const byte_buffer_t& buf) { diff --git a/lib/src/phy/utils/vector.c b/lib/src/phy/utils/vector.c index d1961011e..26be1b2b4 100644 --- a/lib/src/phy/utils/vector.c +++ b/lib/src/phy/utils/vector.c @@ -39,6 +39,13 @@ #include "volk/volk.h" #endif +#ifdef DEBUG_MODE +#warning FIXME: Disabling SSE/AVX vector code +#undef LV_HAVE_SSE +#undef LV_HAVE_AVX +#endif + + int srslte_vec_acc_ii(int *x, uint32_t len) { int i; int z=0; @@ -295,21 +302,17 @@ void srslte_vec_lut_fuf(float *x, uint32_t *lut, float *y, uint32_t len) { } void srslte_vec_lut_sss(short *x, unsigned short *lut, short *y, uint32_t len) { -#ifdef DEBUG_MODE -#warning FIXME: Disabling SSE/AVX in srslte_vec_lut_sss -#else -#ifdef LV_HAVE_SSE +#ifndef LV_HAVE_SSE for (int i=0;i