Merging test-x310, ci-dev-nr-add-gnb-nr-ur-uspr-testing and nr-mimo-mode-clean branches

This commit is contained in:
yilmazt
2019-05-20 21:32:34 +02:00
74 changed files with 6954 additions and 908 deletions
+4 -39
View File
@@ -28,12 +28,12 @@
#define _GNU_SOURCE
#include "flexran_agent.h"
#include <common/utils/system.h>
#include <pthread.h>
#include <arpa/inet.h>
void *receive_thread(void *args);
pthread_t new_thread(void *(*f)(void *), void *b);
Protocol__FlexranMessage *flexran_agent_timeout(void* args);
@@ -147,38 +147,6 @@ error:
}
/* utility function to create a thread */
pthread_t new_thread(void *(*f)(void *), void *b) {
pthread_t t;
pthread_attr_t att;
if (pthread_attr_init(&att)){
fprintf(stderr, "pthread_attr_init err\n");
exit(1);
}
struct sched_param sched_param_recv_thread;
sched_param_recv_thread.sched_priority = sched_get_priority_max(SCHED_FIFO) - 1;
pthread_attr_setschedparam(&att, &sched_param_recv_thread);
pthread_attr_setschedpolicy(&att, SCHED_FIFO);
if (pthread_attr_setdetachstate(&att, PTHREAD_CREATE_DETACHED)) {
fprintf(stderr, "pthread_attr_setdetachstate err\n");
exit(1);
}
if (pthread_create(&t, &att, f, b)) {
fprintf(stderr, "pthread_create err\n");
exit(1);
}
if (pthread_attr_destroy(&att)) {
fprintf(stderr, "pthread_attr_destroy err\n");
exit(1);
}
return t;
}
int channel_container_init = 0;
int flexran_agent_start(mid_t mod_id)
{
@@ -235,12 +203,9 @@ int flexran_agent_start(mid_t mod_id)
*/
/*Initialize the continuous stats update mechanism*/
if (flexran_agent_init_cont_stats_update(mod_id) < 0) {
LOG_E(FLEXRAN_AGENT, "could not initialize continuous stats updates\n");
goto error;
}
new_thread(receive_thread, flexran);
flexran_agent_init_cont_stats_update(mod_id);
pthread_t t;
threadCreate(&t, receive_thread, flexran, "flexran", -1, OAI_PRIORITY_RT);
/* Register and initialize the control modules depending on capabilities.
* After registering, calling flexran_agent_get_*_xface() tells whether a