Commit d836650d authored by Michael Cook's avatar Michael Cook

Call sched_setscheduler

parent 2499b480
/.ue.nvram0
/.ue_emm.nvram0
/.usim.nvram0
/nvram
/usim
...@@ -511,6 +511,14 @@ static void wait_nfapi_init(char *thread_name) { ...@@ -511,6 +511,14 @@ static void wait_nfapi_init(char *thread_name) {
int main ( int argc, char **argv ) int main ( int argc, char **argv )
{ {
struct sched_param param = {
.sched_priority = sched_get_priority_max(SCHED_RR)
};
if (sched_setscheduler( 0, SCHED_RR, &param ) == -1 )
fprintf(stderr,"error setting scheduler ... are you root?\n");
else
fprintf(stderr,"selected rt scheduler\n");
int i; int i;
int CC_id = 0; int CC_id = 0;
int ru_id; int ru_id;
......
...@@ -1038,6 +1038,7 @@ static void *UE_phy_stub_standalone_pnf_task(void *arg) ...@@ -1038,6 +1038,7 @@ static void *UE_phy_stub_standalone_pnf_task(void *arg)
int num_lone = 0; int num_lone = 0;
int last_sfn_sf = -1; int last_sfn_sf = -1;
uint64_t last_subframe_start = clock_usec();
while (!oai_exit) { while (!oai_exit) {
bool sent_any = false; bool sent_any = false;
int sfn_sf = current_sfn_sf; int sfn_sf = current_sfn_sf;
...@@ -1045,6 +1046,12 @@ static void *UE_phy_stub_standalone_pnf_task(void *arg) ...@@ -1045,6 +1046,12 @@ static void *UE_phy_stub_standalone_pnf_task(void *arg)
usleep(100); usleep(100);
continue; continue;
} }
uint64_t subframe_start = clock_usec();
LOG_I(MAC, "subframe elapsed %" PRIu64 "usec\n",
subframe_start - last_subframe_start);
last_subframe_start = subframe_start;
last_sfn_sf = sfn_sf; last_sfn_sf = sfn_sf;
proc->subframe_rx = NFAPI_SFNSF2SF(sfn_sf); proc->subframe_rx = NFAPI_SFNSF2SF(sfn_sf);
proc->frame_rx = NFAPI_SFNSF2SFN(sfn_sf); proc->frame_rx = NFAPI_SFNSF2SFN(sfn_sf);
......
...@@ -543,6 +543,14 @@ void init_pdcp(void) { ...@@ -543,6 +543,14 @@ void init_pdcp(void) {
} }
int main( int argc, char **argv ) { int main( int argc, char **argv ) {
struct sched_param param = {
.sched_priority = sched_get_priority_max(SCHED_RR)
};
if (sched_setscheduler( 0, SCHED_RR, &param ) == -1 )
fprintf(stderr,"error setting scheduler ... are you root?\n");
else
fprintf(stderr,"selected rt scheduler\n");
int CC_id; int CC_id;
uint8_t abstraction_flag=0; uint8_t abstraction_flag=0;
#ifdef UESIM_EXPANSION #ifdef UESIM_EXPANSION
......
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