Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
O
OpenXG-RAN
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
OpenXG
OpenXG-RAN
Commits
ed0ab2ef
Commit
ed0ab2ef
authored
Mar 01, 2024
by
Laurent THOMAS
Committed by
sagar arora
May 22, 2024
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
move declarations out from log.h to a better place
parent
ba6eb138
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
11 additions
and
12 deletions
+11
-12
common/utils/LOG/log.c
common/utils/LOG/log.c
+9
-0
common/utils/LOG/log.h
common/utils/LOG/log.h
+0
-11
common/utils/utils.h
common/utils/utils.h
+1
-0
openair2/PHY_INTERFACE/phy_stub_UE.c
openair2/PHY_INTERFACE/phy_stub_UE.c
+1
-1
No files found.
common/utils/LOG/log.c
View file @
ed0ab2ef
...
@@ -48,6 +48,8 @@
...
@@ -48,6 +48,8 @@
#include <stdatomic.h>
#include <stdatomic.h>
#include "common/utils/LOG/log.h"
#include "common/utils/LOG/log.h"
#define LOG_MEM_SIZE 100*1024*1024
// main log variables
// main log variables
// Fixme: a better place to be shure it is called
// Fixme: a better place to be shure it is called
...
@@ -58,6 +60,13 @@ void read_cpu_hardware (void) __attribute__ ((constructor));
...
@@ -58,6 +60,13 @@ void read_cpu_hardware (void) __attribute__ ((constructor));
void
read_cpu_hardware
(
void
)
{}
void
read_cpu_hardware
(
void
)
{}
#endif
#endif
typedef
struct
{
char
*
buf_p
;
int
buf_index
;
int
enable_flag
;
}
log_mem_cnt_t
;
static
log_mem_cnt_t
log_mem_d
[
2
];
static
log_mem_cnt_t
log_mem_d
[
2
];
static
int
log_mem_flag
=
0
;
static
int
log_mem_flag
=
0
;
volatile
int
log_mem_side
=
0
;
volatile
int
log_mem_side
=
0
;
...
...
common/utils/LOG/log.h
View file @
ed0ab2ef
...
@@ -57,8 +57,6 @@
...
@@ -57,8 +57,6 @@
#ifdef NDEBUG
#ifdef NDEBUG
#warning assert is disabled
#warning assert is disabled
#endif
#endif
#define NUM_ELEMENTS(ARRAY) (sizeof(ARRAY) / sizeof(ARRAY[0]))
#define CHECK_INDEX(ARRAY, INDEX) assert((INDEX) < NUM_ELEMENTS(ARRAY))
#ifdef __cplusplus
#ifdef __cplusplus
extern
"C"
{
extern
"C"
{
...
@@ -295,18 +293,9 @@ int is_newline( char *str, int size);
...
@@ -295,18 +293,9 @@ int is_newline( char *str, int size);
int
register_log_component
(
char
*
name
,
char
*
fext
,
int
compidx
);
int
register_log_component
(
char
*
name
,
char
*
fext
,
int
compidx
);
#define LOG_MEM_SIZE 100*1024*1024
#define LOG_MEM_FILE "./logmem.log"
void
flush_mem_to_file
(
void
);
int
logInit_log_mem
(
char
*
);
int
logInit_log_mem
(
char
*
);
void
close_log_mem
(
void
);
void
close_log_mem
(
void
);
typedef
struct
{
char
*
buf_p
;
int
buf_index
;
int
enable_flag
;
}
log_mem_cnt_t
;
/** @}*/
/** @}*/
/*!\fn int32_t write_file_matlab(const char *fname, const char *vname, void *data, int length, int dec, char format);
/*!\fn int32_t write_file_matlab(const char *fname, const char *vname, void *data, int length, int dec, char format);
...
...
common/utils/utils.h
View file @
ed0ab2ef
...
@@ -18,6 +18,7 @@ extern "C" {
...
@@ -18,6 +18,7 @@ extern "C" {
#endif
#endif
#define sizeofArray(a) (sizeof(a)/sizeof(*(a)))
#define sizeofArray(a) (sizeof(a)/sizeof(*(a)))
#define CHECK_INDEX(ARRAY, INDEX) assert((INDEX) < sizeofArray(ARRAY))
// Prevent double evaluation in max macro
// Prevent double evaluation in max macro
#define cmax(a,b) ({ __typeof__ (a) _a = (a); \
#define cmax(a,b) ({ __typeof__ (a) _a = (a); \
...
...
openair2/PHY_INTERFACE/phy_stub_UE.c
View file @
ed0ab2ef
...
@@ -1957,7 +1957,7 @@ static int get_mcs_from_sinr(float sinr)
...
@@ -1957,7 +1957,7 @@ static int get_mcs_from_sinr(float sinr)
static
int
get_cqi_from_mcs
(
void
)
static
int
get_cqi_from_mcs
(
void
)
{
{
static
const
int
mcs_to_cqi
[]
=
{
0
,
1
,
2
,
3
,
3
,
4
,
4
,
5
,
5
,
6
,
6
,
7
,
7
,
8
,
8
,
9
,
9
,
10
,
10
,
11
,
11
,
12
,
12
,
13
,
13
,
14
,
14
,
15
,
15
};
static
const
int
mcs_to_cqi
[]
=
{
0
,
1
,
2
,
3
,
3
,
4
,
4
,
5
,
5
,
6
,
6
,
7
,
7
,
8
,
8
,
9
,
9
,
10
,
10
,
11
,
11
,
12
,
12
,
13
,
13
,
14
,
14
,
15
,
15
};
assert
(
NUM_ELEMENTS
(
mcs_to_cqi
)
==
NUM_MCS
);
assert
(
sizeofArray
(
mcs_to_cqi
)
==
NUM_MCS
);
int
sf
=
0
;
int
sf
=
0
;
while
(
sf
<
NUM_NFAPI_SUBFRAME
)
while
(
sf
<
NUM_NFAPI_SUBFRAME
)
{
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment