Address review comments
This commit is contained in:
@@ -60,10 +60,10 @@ typedef struct notifiedFIFO_elt_s {
|
|||||||
struct notifiedFIFO_s *reponseFifo;
|
struct notifiedFIFO_s *reponseFifo;
|
||||||
void (*processingFunc)(void *);
|
void (*processingFunc)(void *);
|
||||||
bool malloced;
|
bool malloced;
|
||||||
OAI_CPUTIME_TYPE creationTime;
|
oai_cputime_t creationTime;
|
||||||
OAI_CPUTIME_TYPE startProcessingTime;
|
oai_cputime_t startProcessingTime;
|
||||||
OAI_CPUTIME_TYPE endProcessingTime;
|
oai_cputime_t endProcessingTime;
|
||||||
OAI_CPUTIME_TYPE returnTime;
|
oai_cputime_t returnTime;
|
||||||
void *msgData;
|
void *msgData;
|
||||||
} notifiedFIFO_elt_t;
|
} notifiedFIFO_elt_t;
|
||||||
|
|
||||||
@@ -96,9 +96,12 @@ static inline void *NotifiedFifoData(notifiedFIFO_elt_t *elt) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
static inline void delNotifiedFIFO_elt(notifiedFIFO_elt_t *elt) {
|
static inline void delNotifiedFIFO_elt(notifiedFIFO_elt_t *elt) {
|
||||||
AssertFatal(elt->malloced, "delNotifiedFIFO on something not allocated by newNotifiedFIFO\n");
|
if (elt->malloced) {
|
||||||
elt->malloced=false;
|
elt->malloced = false;
|
||||||
free(elt);
|
free(elt);
|
||||||
|
}
|
||||||
|
/* it is allowed to call delNotifiedFIFO_elt when the memory is managed by
|
||||||
|
* the caller */
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline void initNotifiedFIFO_nothreadSafe(notifiedFIFO_t *nf) {
|
static inline void initNotifiedFIFO_nothreadSafe(notifiedFIFO_t *nf) {
|
||||||
|
|||||||
@@ -36,9 +36,9 @@ extern int opp_enabled;
|
|||||||
extern double cpu_freq_GHz __attribute__ ((aligned(32)));;
|
extern double cpu_freq_GHz __attribute__ ((aligned(32)));;
|
||||||
// structure to store data to compute cpu measurment
|
// structure to store data to compute cpu measurment
|
||||||
#if defined(__x86_64__) || defined(__i386__)
|
#if defined(__x86_64__) || defined(__i386__)
|
||||||
#define OAI_CPUTIME_TYPE long long
|
typedef long long oai_cputime_t;
|
||||||
#elif defined(__arm__)
|
#elif defined(__arm__)
|
||||||
#define OAI_CPUTIME_TYPE uint32_t
|
typedef uint32_t oai_cputime_t;
|
||||||
#else
|
#else
|
||||||
#error "building on unsupported CPU architecture"
|
#error "building on unsupported CPU architecture"
|
||||||
#endif
|
#endif
|
||||||
@@ -53,17 +53,17 @@ typedef void(*meas_printfunc_t)(const char* format, ...);
|
|||||||
typedef struct {
|
typedef struct {
|
||||||
int msgid; /*!< \brief message id, as defined by TIMESTAT_MSGID_X macros */
|
int msgid; /*!< \brief message id, as defined by TIMESTAT_MSGID_X macros */
|
||||||
int timestat_id; /*!< \brief points to the time_stats_t entry in cpumeas table */
|
int timestat_id; /*!< \brief points to the time_stats_t entry in cpumeas table */
|
||||||
OAI_CPUTIME_TYPE ts; /*!< \brief time stamp */
|
oai_cputime_t ts; /*!< \brief time stamp */
|
||||||
meas_printfunc_t displayFunc; /*!< \brief function to call when DISPLAY message is received*/
|
meas_printfunc_t displayFunc; /*!< \brief function to call when DISPLAY message is received*/
|
||||||
} time_stats_msg_t;
|
} time_stats_msg_t;
|
||||||
|
|
||||||
struct notifiedFIFO_elt_s;
|
struct notifiedFIFO_elt_s;
|
||||||
typedef struct time_stats {
|
typedef struct time_stats {
|
||||||
OAI_CPUTIME_TYPE in; /*!< \brief time at measure starting point */
|
oai_cputime_t in; /*!< \brief time at measure starting point */
|
||||||
OAI_CPUTIME_TYPE diff; /*!< \brief average difference between time at starting point and time at endpoint*/
|
oai_cputime_t diff; /*!< \brief average difference between time at starting point and time at endpoint*/
|
||||||
OAI_CPUTIME_TYPE p_time; /*!< \brief absolute process duration */
|
oai_cputime_t p_time; /*!< \brief absolute process duration */
|
||||||
OAI_CPUTIME_TYPE diff_square; /*!< \brief process duration square */
|
oai_cputime_t diff_square; /*!< \brief process duration square */
|
||||||
OAI_CPUTIME_TYPE max; /*!< \brief maximum difference between time at starting point and time at endpoint*/
|
oai_cputime_t max; /*!< \brief maximum difference between time at starting point and time at endpoint*/
|
||||||
int trials; /*!< \brief number of start point - end point iterations */
|
int trials; /*!< \brief number of start point - end point iterations */
|
||||||
int meas_flag; /*!< \brief 1: stop_meas not called (consecutive calls of start_meas) */
|
int meas_flag; /*!< \brief 1: stop_meas not called (consecutive calls of start_meas) */
|
||||||
char *meas_name; /*!< \brief name to use when printing the measure (not used for PHY simulators)*/
|
char *meas_name; /*!< \brief name to use when printing the measure (not used for PHY simulators)*/
|
||||||
|
|||||||
@@ -423,7 +423,7 @@ void init_gNB_Tpool(int inst) {
|
|||||||
s_offset += 3;
|
s_offset += 3;
|
||||||
}
|
}
|
||||||
if (getenv("noThreads")) strcpy(pool, "n");
|
if (getenv("noThreads")) strcpy(pool, "n");
|
||||||
initTpool(pool, gNB->threadPool, true);
|
initTpool(pool, gNB->threadPool, cpumeas(CPUMEAS_GETSTATE));
|
||||||
// ULSCH decoder result FIFO
|
// ULSCH decoder result FIFO
|
||||||
gNB->respDecode = (notifiedFIFO_t*) malloc(sizeof(notifiedFIFO_t));
|
gNB->respDecode = (notifiedFIFO_t*) malloc(sizeof(notifiedFIFO_t));
|
||||||
initNotifiedFIFO(gNB->respDecode);
|
initNotifiedFIFO(gNB->respDecode);
|
||||||
|
|||||||
Reference in New Issue
Block a user