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
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
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
lizhongxiao
OpenXG-RAN
Commits
29bfcdb3
Commit
29bfcdb3
authored
Jul 02, 2019
by
Wang Tsu-Han
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
modified uhd set priority to USRP only
parent
1ce0700e
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
20 additions
and
16 deletions
+20
-16
executables/nr-ru.c
executables/nr-ru.c
+2
-2
targets/ARCH/COMMON/common_lib.c
targets/ARCH/COMMON/common_lib.c
+6
-8
targets/ARCH/COMMON/common_lib.h
targets/ARCH/COMMON/common_lib.h
+5
-3
targets/ARCH/USRP/USERSPACE/LIB/usrp_lib.cpp
targets/ARCH/USRP/USERSPACE/LIB/usrp_lib.cpp
+7
-3
No files found.
executables/nr-ru.c
View file @
29bfcdb3
...
...
@@ -1209,9 +1209,9 @@ static void *ru_thread_tx( void *param ) {
int
ret
;
if
(
ru
->
if_south
==
LOCAL_RF
)
if
(
ru
->
rfdevice
.
uhd_set_thread_priority
!=
NULL
)
{
//uhd_set_thread_prio
();
ru
->
rfdevice
.
uhd_set_thread_priority
();
LOG_I
(
PHY
,
"set ru_thread_tx uhd priority"
);
}
...
...
targets/ARCH/COMMON/common_lib.c
View file @
29bfcdb3
...
...
@@ -109,7 +109,6 @@ int load_lib(openair0_device *device, openair0_config_t *openair0_cfg, eth_param
else
libname
=
OAI_RF_LIBNAME
;
shlib_fdesc
[
0
].
fname
=
"device_init"
;
//shlib_fdesc[1].fname="uhd_set_thread_priority";
}
else
{
libname
=
OAI_TP_LIBNAME
;
shlib_fdesc
[
0
].
fname
=
"transport_init"
;
...
...
@@ -119,13 +118,12 @@ int load_lib(openair0_device *device, openair0_config_t *openair0_cfg, eth_param
LOG_E
(
HW
,
"Library %s couldn't be loaded
\n
"
,
libname
);
}
else
{
ret
=
((
devfunc_t
)
shlib_fdesc
[
0
].
fptr
)(
device
,
openair0_cfg
,
cfg
);
//uhd_set_thread_priority_fun = (set_prio_func_t)shlib_fdesc[1].fptr;
}
return
ret
;
}
/*
void uhd_set_thread_prio(void) {
/*
void uhd_set_thread_prio(void) {
loader_shlibfunc_t shlib_fdesc[1];
int ret = 0;
...
...
@@ -135,17 +133,17 @@ void uhd_set_thread_prio(void) {
libname="rfsimulator";
else
libname=OAI_RF_LIBNAME;
//
shlib_fdesc[0].fname="uhd_set_thread_priority";
shlib_fdesc[0].fname="uhd_set_thread_priority";
ret=load_module_shlib(libname,shlib_fdesc,1,NULL);
if (ret < 0) {
LOG_E(HW,"Library %s couldn't be loaded\n",libname);
} else {
//
(set_prio_func_t)shlib_fdesc[0].fptr();
(set_prio_func_t)shlib_fdesc[0].fptr();
}
return ret;
}
*/
}
*/
int
openair0_device_load
(
openair0_device
*
device
,
openair0_config_t
*
openair0_cfg
)
{
...
...
targets/ARCH/COMMON/common_lib.h
View file @
29bfcdb3
...
...
@@ -387,6 +387,10 @@ struct openair0_device_t {
* \param arg pointer to capabilities or configuration
*/
void
(
*
configure_rru
)(
int
idx
,
void
*
arg
);
/*! \brief set UHD thread priority
*/
void
(
*
uhd_set_thread_priority
)(
void
);
};
/* type of device init function, implemented in shared lib */
...
...
@@ -445,9 +449,7 @@ int openair0_set_rx_frequencies(openair0_device *device, openair0_config_t *open
#define gettid() syscall(__NR_gettid)
/*@}*/
void
uhd_set_thread_prio
(
void
);
typedef
void
(
*
set_prio_func_t
)(
void
);
//set_prio_func_t uhd_set_thread_priority_fun;
#ifdef __cplusplus
}
...
...
targets/ARCH/USRP/USERSPACE/LIB/usrp_lib.cpp
View file @
29bfcdb3
...
...
@@ -907,6 +907,12 @@ int trx_usrp_reset_stats(openair0_device *device) {
return
(
0
);
}
/*! \brief Set uhd priority
*/
void
uhd_set_thread_priority
(
void
)
{
uhd
::
set_thread_priority_safe
(
1.0
);
}
#if defined(USRP_REC_PLAY)
extern
"C"
{
/*! \brief Initializer for USRP record/playback config
...
...
@@ -1044,6 +1050,7 @@ extern "C" {
device
->
trx_set_freq_func
=
trx_usrp_set_freq
;
device
->
trx_set_gains_func
=
trx_usrp_set_gains
;
device
->
openair0_cfg
=
openair0_cfg
;
device
->
uhd_set_thread_priority
=
uhd_set_thread_priority
;
std
::
cerr
<<
"USRP device initialized in subframes replay mode for "
<<
u_sf_loops
<<
" loops. Use mmap="
<<
use_mmap
<<
std
::
endl
;
}
else
{
...
...
@@ -1463,9 +1470,6 @@ extern "C" {
return
0
;
}
void
uhd_set_thread_priority
(
void
)
{
uhd
::
set_thread_priority_safe
(
1.0
);
}
}
/*@}*/
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