Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
openairinterface5G
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Worker.N
openairinterface5G
Commits
cba9d69b
Commit
cba9d69b
authored
6 years ago
by
frtabu
Browse files
Options
Downloads
Patches
Plain Diff
fix segfault when running with stdout stream caching disabled
parent
6c23bdec
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
common/utils/LOG/log.c
+5
-0
5 additions, 0 deletions
common/utils/LOG/log.c
common/utils/LOG/log.h
+1
-7
1 addition, 7 deletions
common/utils/LOG/log.h
openair1/PHY/LTE_ESTIMATION/lte_sync_time.c
+5
-10
5 additions, 10 deletions
openair1/PHY/LTE_ESTIMATION/lte_sync_time.c
with
11 additions
and
17 deletions
common/utils/LOG/log.c
+
5
−
0
View file @
cba9d69b
...
@@ -73,6 +73,7 @@ mapping log_options[] = {
...
@@ -73,6 +73,7 @@ mapping log_options[] = {
mapping
log_maskmap
[]
=
{
mapping
log_maskmap
[]
=
{
{
"prach"
,
DEBUG_PRACH
},
{
"prach"
,
DEBUG_PRACH
},
{
"RU"
,
DEBUG_RU
},
{
"RU"
,
DEBUG_RU
},
{
"LTEESTIM"
,
DEBUG_LTEESTIM
},
{
"ctrlsocket"
,
DEBUG_CTRLSOCKET
},
{
"ctrlsocket"
,
DEBUG_CTRLSOCKET
},
{
"UE_PHYPROC"
,
DEBUG_UE_PHYPROC
},
{
"UE_PHYPROC"
,
DEBUG_UE_PHYPROC
},
{
"UE_TIMING"
,
UE_TIMING
},
{
"UE_TIMING"
,
UE_TIMING
},
...
@@ -315,10 +316,14 @@ void log_getconfig(log_t *g_log) {
...
@@ -315,10 +316,14 @@ void log_getconfig(log_t *g_log) {
logparams_debug
[
i
].
defuintval
=
0
;
logparams_debug
[
i
].
defuintval
=
0
;
logparams_debug
[
i
].
type
=
TYPE_UINT
;
logparams_debug
[
i
].
type
=
TYPE_UINT
;
logparams_debug
[
i
].
paramflags
=
PARAMFLAG_BOOL
;
logparams_debug
[
i
].
paramflags
=
PARAMFLAG_BOOL
;
logparams_debug
[
i
].
uptr
=
NULL
;
logparams_debug
[
i
].
chkPptr
=
NULL
;
logparams_debug
[
i
].
numelt
=
0
;
logparams_debug
[
i
].
numelt
=
0
;
logparams_matlab
[
i
].
defuintval
=
0
;
logparams_matlab
[
i
].
defuintval
=
0
;
logparams_matlab
[
i
].
type
=
TYPE_UINT
;
logparams_matlab
[
i
].
type
=
TYPE_UINT
;
logparams_matlab
[
i
].
paramflags
=
PARAMFLAG_BOOL
;
logparams_matlab
[
i
].
paramflags
=
PARAMFLAG_BOOL
;
logparams_matlab
[
i
].
uptr
=
NULL
;
logparams_matlab
[
i
].
chkPptr
=
NULL
;
logparams_matlab
[
i
].
numelt
=
0
;
logparams_matlab
[
i
].
numelt
=
0
;
}
}
config_get
(
logparams_debug
,(
sizeof
(
log_maskmap
)
/
sizeof
(
mapping
))
-
1
,
CONFIG_STRING_LOG_PREFIX
);
config_get
(
logparams_debug
,(
sizeof
(
log_maskmap
)
/
sizeof
(
mapping
))
-
1
,
CONFIG_STRING_LOG_PREFIX
);
...
...
This diff is collapsed.
Click to expand it.
common/utils/LOG/log.h
+
1
−
7
View file @
cba9d69b
...
@@ -134,6 +134,7 @@ extern "C" {
...
@@ -134,6 +134,7 @@ extern "C" {
#define DEBUG_PRACH (1<<0)
#define DEBUG_PRACH (1<<0)
#define DEBUG_RU (1<<1)
#define DEBUG_RU (1<<1)
#define DEBUG_UE_PHYPROC (1<<2)
#define DEBUG_UE_PHYPROC (1<<2)
#define DEBUG_LTEESTIM (1<<3)
#define DEBUG_CTRLSOCKET (1<<10)
#define DEBUG_CTRLSOCKET (1<<10)
#define UE_TIMING (1<<20)
#define UE_TIMING (1<<20)
...
@@ -143,13 +144,6 @@ extern "C" {
...
@@ -143,13 +144,6 @@ extern "C" {
#define SET_LOG_MATLAB(O) g_log->matlab_mask = (g_log->matlab_mask | O)
#define SET_LOG_MATLAB(O) g_log->matlab_mask = (g_log->matlab_mask | O)
#define CLEAR_LOG_MATLAB(O) g_log->matlab_mask = (g_log->matlab_mask & (~O))
#define CLEAR_LOG_MATLAB(O) g_log->matlab_mask = (g_log->matlab_mask & (~O))
/* @}*/
#define OAI_OK 0
/*!< \brief all ok */
#define OAI_ERR 1
/*!< \brief generic error */
#define OAI_ERR_READ_ONLY 2
/*!< \brief tried to write to read-only item */
#define OAI_ERR_NOTFOUND 3
/*!< \brief something wasn't found */
/* @}*/
typedef
enum
{
typedef
enum
{
...
...
This diff is collapsed.
Click to expand it.
openair1/PHY/LTE_ESTIMATION/lte_sync_time.c
+
5
−
10
View file @
cba9d69b
...
@@ -274,11 +274,11 @@ int lte_sync_time_init(LTE_DL_FRAME_PARMS *frame_parms ) // LTE_UE_COMMON *com
...
@@ -274,11 +274,11 @@ int lte_sync_time_init(LTE_DL_FRAME_PARMS *frame_parms ) // LTE_UE_COMMON *com
#ifdef DEBUG_PHY
LOG_M_BEGIN
(
DEBUG_LTEESTIM
);
LOG_M
(
"primary_sync0.m"
,
"psync0"
,
primary_synch0_time
,
frame_parms
->
ofdm_symbol_size
,
1
,
1
);
LOG_M
(
"primary_sync0.m"
,
"psync0"
,
primary_synch0_time
,
frame_parms
->
ofdm_symbol_size
,
1
,
1
);
LOG_M
(
"primary_sync1.m"
,
"psync1"
,
primary_synch1_time
,
frame_parms
->
ofdm_symbol_size
,
1
,
1
);
LOG_M
(
"primary_sync1.m"
,
"psync1"
,
primary_synch1_time
,
frame_parms
->
ofdm_symbol_size
,
1
,
1
);
LOG_M
(
"primary_sync2.m"
,
"psync2"
,
primary_synch2_time
,
frame_parms
->
ofdm_symbol_size
,
1
,
1
);
LOG_M
(
"primary_sync2.m"
,
"psync2"
,
primary_synch2_time
,
frame_parms
->
ofdm_symbol_size
,
1
,
1
);
#endif
LOG_M_END
return
(
1
);
return
(
1
);
}
}
...
@@ -330,10 +330,6 @@ static inline int abs32(int x)
...
@@ -330,10 +330,6 @@ static inline int abs32(int x)
return
(((
int
)((
short
*
)
&
x
)[
0
])
*
((
int
)((
short
*
)
&
x
)[
0
])
+
((
int
)((
short
*
)
&
x
)[
1
])
*
((
int
)((
short
*
)
&
x
)[
1
]));
return
(((
int
)((
short
*
)
&
x
)[
0
])
*
((
int
)((
short
*
)
&
x
)[
0
])
+
((
int
)((
short
*
)
&
x
)[
1
])
*
((
int
)((
short
*
)
&
x
)[
1
]));
}
}
#ifdef DEBUG_PHY
int
debug_cnt
=
0
;
#endif
#define SHIFT 17
#define SHIFT 17
int
lte_sync_time
(
int
**
rxdata
,
///rx data in time domain
int
lte_sync_time
(
int
**
rxdata
,
///rx data in time domain
...
@@ -464,7 +460,8 @@ int lte_sync_time(int **rxdata, ///rx data in time domain
...
@@ -464,7 +460,8 @@ int lte_sync_time(int **rxdata, ///rx data in time domain
LOG_I
(
PHY
,
"[UE] lte_sync_time: Sync source = %d, Peak found at pos %d, val = %d (%d dB)
\n
"
,
sync_source
,
peak_pos
,
peak_val
,
dB_fixed
(
peak_val
)
/
2
);
LOG_I
(
PHY
,
"[UE] lte_sync_time: Sync source = %d, Peak found at pos %d, val = %d (%d dB)
\n
"
,
sync_source
,
peak_pos
,
peak_val
,
dB_fixed
(
peak_val
)
/
2
);
#ifdef DEBUG_PHY
LOG_M_BEGIN
(
DEBUG_LTEESTIM
)
static
int
debug_cnt
;
if
(
debug_cnt
==
0
)
{
if
(
debug_cnt
==
0
)
{
LOG_M
(
"sync_corr0_ue.m"
,
"synccorr0"
,
sync_corr_ue0
,
2
*
length
,
1
,
2
);
LOG_M
(
"sync_corr0_ue.m"
,
"synccorr0"
,
sync_corr_ue0
,
2
*
length
,
1
,
2
);
LOG_M
(
"sync_corr1_ue.m"
,
"synccorr1"
,
sync_corr_ue1
,
2
*
length
,
1
,
2
);
LOG_M
(
"sync_corr1_ue.m"
,
"synccorr1"
,
sync_corr_ue1
,
2
*
length
,
1
,
2
);
...
@@ -474,9 +471,7 @@ int lte_sync_time(int **rxdata, ///rx data in time domain
...
@@ -474,9 +471,7 @@ int lte_sync_time(int **rxdata, ///rx data in time domain
}
else
{
}
else
{
debug_cnt
++
;
debug_cnt
++
;
}
}
LOG_M_END
#endif
return
(
peak_pos
);
return
(
peak_pos
);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment