Commit 7a9175e2 authored by Haruki NAOI's avatar Haruki NAOI

fix: compile error using "--mu" build option.

parent 0dcb3ca3
...@@ -669,42 +669,43 @@ void nfapi_log(const char *file, const char *func, int line, int comp, int level ...@@ -669,42 +669,43 @@ void nfapi_log(const char *file, const char *func, int line, int comp, int level
va_end(args); va_end(args);
// OAI printf compatibility // OAI printf compatibility
if ((g_log->onlinelog == 1) && (level != LOG_FILE)) if ((g_log->onlinelog == 1) && (level != LOG_FILE)) {
if(log_mem_flag==1){ if(log_mem_flag==1){
if(log_mem_d[log_mem_side].enable_flag==1){ if(log_mem_d[log_mem_side].enable_flag==1){
int temp_index; int temp_index;
temp_index=log_mem_d[log_mem_side].buf_index; temp_index=log_mem_d[log_mem_side].buf_index;
if(temp_index+len+1 < LOG_MEM_SIZE){ if(temp_index+len+1 < LOG_MEM_SIZE){
log_mem_d[log_mem_side].buf_index+=len; log_mem_d[log_mem_side].buf_index+=len;
memcpy(&log_mem_d[log_mem_side].buf_p[temp_index],log_buffer,len); memcpy(&log_mem_d[log_mem_side].buf_p[temp_index],log_buffer,len);
}else{ }else{
log_mem_d[log_mem_side].enable_flag=0; log_mem_d[log_mem_side].enable_flag=0;
if(log_mem_d[1-log_mem_side].enable_flag==1){ if(log_mem_d[1-log_mem_side].enable_flag==1){
temp_index=log_mem_d[1-log_mem_side].buf_index; temp_index=log_mem_d[1-log_mem_side].buf_index;
if(temp_index+len+1 < LOG_MEM_SIZE){ if(temp_index+len+1 < LOG_MEM_SIZE){
log_mem_d[1-log_mem_side].buf_index+=len; log_mem_d[1-log_mem_side].buf_index+=len;
log_mem_side=1-log_mem_side; log_mem_side=1-log_mem_side;
memcpy(&log_mem_d[log_mem_side].buf_p[temp_index],log_buffer,len); memcpy(&log_mem_d[log_mem_side].buf_p[temp_index],log_buffer,len);
/* write down !*/ /* write down !*/
if (pthread_mutex_lock(&log_mem_lock) != 0) { if (pthread_mutex_lock(&log_mem_lock) != 0) {
return; return;
}
if(log_mem_write_flag==0){
log_mem_write_side=1-log_mem_side;
if(pthread_cond_signal(&log_mem_notify) != 0) {
} }
if(log_mem_write_flag==0){
log_mem_write_side=1-log_mem_side;
if(pthread_cond_signal(&log_mem_notify) != 0) {
}
}
if(pthread_mutex_unlock(&log_mem_lock) != 0) {
return;
}
}else{
log_mem_d[1-log_mem_side].enable_flag=0;
} }
if(pthread_mutex_unlock(&log_mem_lock) != 0) {
return;
}
}else{
log_mem_d[1-log_mem_side].enable_flag=0;
} }
} }
} }
}else{
fwrite(log_buffer, len, 1, stdout);
} }
}else{
fwrite(log_buffer, len, 1, stdout);
} }
if (g_log->syslog) { if (g_log->syslog) {
......
...@@ -2770,7 +2770,10 @@ void init_RU(char *rf_config_file) { ...@@ -2770,7 +2770,10 @@ void init_RU(char *rf_config_file) {
void stop_ru(RU_t *ru) { void stop_ru(RU_t *ru) {
#if defined(PRE_SCD_THREAD) || defined(PHY_TX_THREAD)
int *status;
#endif
printf("Stopping RU %p processing threads\n",(void*)ru); printf("Stopping RU %p processing threads\n",(void*)ru);
#if defined(PRE_SCD_THREAD) #if defined(PRE_SCD_THREAD)
if(ru){ if(ru){
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment