modified uhd set priority to USRP only

This commit is contained in:
Wang Tsu-Han
2019-07-02 14:36:35 +02:00
parent 1ce0700e5d
commit 29bfcdb371
4 changed files with 20 additions and 16 deletions
+6 -8
View File
@@ -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) {
+5 -3
View File
@@ -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
}